From 09ca89fc9a198a9285f16d62651bb89aff24851b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 5 Jun 2026 14:04:16 +0530 Subject: [PATCH] chore: update Ruby SDK to 25.1.0 --- CHANGELOG.md | 12 +- appwrite.gemspec | 2 +- docs/examples/account/update-password.md | 2 +- docs/examples/health/get-audits-db.md | 14 + .../examples/messaging/create-ses-provider.md | 25 ++ .../examples/messaging/update-ses-provider.md | 25 ++ .../project/update-o-auth-2-server.md | 23 ++ .../update-password-strength-policy.md | 20 ++ lib/appwrite.rb | 1 + lib/appwrite/client.rb | 22 +- lib/appwrite/enums/project_key_scopes.rb | 2 + lib/appwrite/enums/project_policy_id.rb | 1 + .../models/policy_password_strength.rb | 52 ++++ lib/appwrite/models/project.rb | 71 ++++- lib/appwrite/services/account.rb | 47 ++- lib/appwrite/services/activities.rb | 2 + lib/appwrite/services/advisor.rb | 5 + lib/appwrite/services/avatars.rb | 8 + lib/appwrite/services/backups.rb | 12 + lib/appwrite/services/databases.rb | 71 +++++ lib/appwrite/services/functions.rb | 26 ++ lib/appwrite/services/graphql.rb | 2 + lib/appwrite/services/health.rb | 51 ++++ lib/appwrite/services/locale.rb | 8 + lib/appwrite/services/messaging.rb | 150 ++++++++++ lib/appwrite/services/organization.rb | 10 + lib/appwrite/services/presences.rb | 5 + lib/appwrite/services/project.rb | 273 +++++++++++++++--- lib/appwrite/services/proxy.rb | 8 + lib/appwrite/services/sites.rb | 25 ++ lib/appwrite/services/storage.rb | 13 + lib/appwrite/services/tables_db.rb | 71 +++++ lib/appwrite/services/teams.rb | 13 + lib/appwrite/services/tokens.rb | 5 + lib/appwrite/services/usage.rb | 2 + lib/appwrite/services/users.rb | 43 +++ lib/appwrite/services/webhooks.rb | 6 + 37 files changed, 1065 insertions(+), 63 deletions(-) create mode 100644 docs/examples/health/get-audits-db.md create mode 100644 docs/examples/messaging/create-ses-provider.md create mode 100644 docs/examples/messaging/update-ses-provider.md create mode 100644 docs/examples/project/update-o-auth-2-server.md create mode 100644 docs/examples/project/update-password-strength-policy.md create mode 100644 lib/appwrite/models/policy_password_strength.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a8611..64e4fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 25.1.0 + +* Added: `createSesProvider` and `updateSesProvider` to `messaging` +* Added: `updateOAuth2Server` to `project` for OAuth2 server settings +* Added: `updatePasswordStrengthPolicy` and `PolicyPasswordStrength` to `project` +* Added: `getAuditsDB` health check to `health` +* Added: `password-strength` to `ProjectPolicyId` +* Added: `apps.read` and `apps.write` to `ProjectKeyScopes` + + ## 25.0.0 * Breaking: Removed `githubImagine` and `googleImagine` from `ProjectOAuthProviderId` @@ -8,7 +18,7 @@ * Added: `Organization` service for managing projects and API keys * Added: `PolicyDenyAliasedEmail`, `PolicyDenyDisposableEmail`, and `PolicyDenyFreeEmail` policy models * Added: `deny-aliased-email`, `deny-disposable-email`, and `deny-free-email` to `ProjectPolicyId` -* Added: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums +* Replaced: `BrowserTheme`, `HealthQueueName`, `OrganizationKeyScopes`, and `Region` enums * Added: `dart-3.12` and `flutter-3.44` runtimes * Added: `ProjectList` model and new attributes on `Function`, `Site`, and `UsageGauge` * Updated: `functions`, `sites`, `usage`, `health`, and `avatars` services diff --git a/appwrite.gemspec b/appwrite.gemspec index 3dbe12b..80812fd 100644 --- a/appwrite.gemspec +++ b/appwrite.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |spec| spec.name = 'appwrite' - spec.version = '25.0.0' + spec.version = '25.1.0' spec.license = 'BSD-3-Clause' spec.summary = 'Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API' spec.author = 'Appwrite Team' diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index c9f9351..9451611 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -12,6 +12,6 @@ account = Account.new(client) result = account.update_password( password: '', - old_password: 'password' # optional + old_password: '' # optional ) ``` diff --git a/docs/examples/health/get-audits-db.md b/docs/examples/health/get-audits-db.md new file mode 100644 index 0000000..19ad2e7 --- /dev/null +++ b/docs/examples/health/get-audits-db.md @@ -0,0 +1,14 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +health = Health.new(client) + +result = health.get_audits_db() +``` diff --git a/docs/examples/messaging/create-ses-provider.md b/docs/examples/messaging/create-ses-provider.md new file mode 100644 index 0000000..2ac71f7 --- /dev/null +++ b/docs/examples/messaging/create-ses-provider.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_ses_provider( + provider_id: '', + name: '', + access_key: '', # optional + secret_key: '', # optional + region: '', # optional + from_name: '', # optional + from_email: 'email@example.com', # optional + reply_to_name: '', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) +``` diff --git a/docs/examples/messaging/update-ses-provider.md b/docs/examples/messaging/update-ses-provider.md new file mode 100644 index 0000000..9465ac3 --- /dev/null +++ b/docs/examples/messaging/update-ses-provider.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_ses_provider( + provider_id: '', + name: '', # optional + enabled: false, # optional + access_key: '', # optional + secret_key: '', # optional + region: '', # optional + from_name: '', # optional + from_email: 'email@example.com', # optional + reply_to_name: '', # optional + reply_to_email: '' # optional +) +``` diff --git a/docs/examples/project/update-o-auth-2-server.md b/docs/examples/project/update-o-auth-2-server.md new file mode 100644 index 0000000..bad4446 --- /dev/null +++ b/docs/examples/project/update-o-auth-2-server.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +project = Project.new(client) + +result = project.update_o_auth2_server( + enabled: false, + authorization_url: 'https://example.com', + scopes: [], # optional + access_token_duration: 60, # optional + refresh_token_duration: 60, # optional + public_access_token_duration: 60, # optional + public_refresh_token_duration: 60, # optional + confidential_pkce: false # optional +) +``` diff --git a/docs/examples/project/update-password-strength-policy.md b/docs/examples/project/update-password-strength-policy.md new file mode 100644 index 0000000..5163241 --- /dev/null +++ b/docs/examples/project/update-password-strength-policy.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +project = Project.new(client) + +result = project.update_password_strength_policy( + min: 8, # optional + uppercase: false, # optional + lowercase: false, # optional + number: false, # optional + symbols: false # optional +) +``` diff --git a/lib/appwrite.rb b/lib/appwrite.rb index c92ec18..5d707b3 100644 --- a/lib/appwrite.rb +++ b/lib/appwrite.rb @@ -186,6 +186,7 @@ require_relative 'appwrite/models/o_auth2_provider_list' require_relative 'appwrite/models/policy_password_dictionary' require_relative 'appwrite/models/policy_password_history' +require_relative 'appwrite/models/policy_password_strength' require_relative 'appwrite/models/policy_password_personal_data' require_relative 'appwrite/models/policy_session_alert' require_relative 'appwrite/models/policy_session_duration' diff --git a/lib/appwrite/client.rb b/lib/appwrite/client.rb index 1f32708..c41363a 100644 --- a/lib/appwrite/client.rb +++ b/lib/appwrite/client.rb @@ -15,10 +15,11 @@ def initialize 'x-sdk-name'=> 'Ruby', 'x-sdk-platform'=> 'server', 'x-sdk-language'=> 'ruby', - 'x-sdk-version'=> '25.0.0', + 'x-sdk-version'=> '25.1.0', 'X-Appwrite-Response-Format' => '1.9.5' } @endpoint = 'https://cloud.appwrite.io/v1' + @config = {} end # Set Project @@ -29,7 +30,7 @@ def initialize # # @return [self] def set_project(value) - add_header('x-appwrite-project', value) + @config['project'] = value self end @@ -43,6 +44,7 @@ def set_project(value) # @return [self] def set_key(value) add_header('x-appwrite-key', value) + @config['key'] = value self end @@ -56,6 +58,7 @@ def set_key(value) # @return [self] def set_jwt(value) add_header('x-appwrite-jwt', value) + @config['jwt'] = value self end @@ -67,6 +70,7 @@ def set_jwt(value) # @return [self] def set_locale(value) add_header('x-appwrite-locale', value) + @config['locale'] = value self end @@ -80,6 +84,7 @@ def set_locale(value) # @return [self] def set_session(value) add_header('x-appwrite-session', value) + @config['session'] = value self end @@ -93,6 +98,7 @@ def set_session(value) # @return [self] def set_forwarded_user_agent(value) add_header('x-forwarded-user-agent', value) + @config['forwardeduseragent'] = value self end @@ -106,6 +112,7 @@ def set_forwarded_user_agent(value) # @return [self] def set_dev_key(value) add_header('x-appwrite-dev-key', value) + @config['devkey'] = value self end @@ -119,6 +126,7 @@ def set_dev_key(value) # @return [self] def set_cookie(value) add_header('cookie', value) + @config['cookie'] = value self end @@ -132,6 +140,7 @@ def set_cookie(value) # @return [self] def set_impersonate_user_id(value) add_header('x-appwrite-impersonate-user-id', value) + @config['impersonateuserid'] = value self end @@ -145,6 +154,7 @@ def set_impersonate_user_id(value) # @return [self] def set_impersonate_user_email(value) add_header('x-appwrite-impersonate-user-email', value) + @config['impersonateuseremail'] = value self end @@ -158,10 +168,15 @@ def set_impersonate_user_email(value) # @return [self] def set_impersonate_user_phone(value) add_header('x-appwrite-impersonate-user-phone', value) + @config['impersonateuserphone'] = value self end + def get_config(key) + @config[key] || '' + end + # Set endpoint. # # @param [String] endpoint The endpoint to set @@ -223,7 +238,8 @@ def call( params: {}, response_type: nil ) - uri = URI.parse(@endpoint + path + ((method == "GET" && params.length) ? '?' + encode(params) : '')) + separator = path.include?('?') ? '&' : '?' + uri = URI.parse(@endpoint + path + ((method == "GET" && params.length) ? separator + encode(params) : '')) fetch(method, uri, headers, params, response_type) end diff --git a/lib/appwrite/enums/project_key_scopes.rb b/lib/appwrite/enums/project_key_scopes.rb index 14d0108..146c1bc 100644 --- a/lib/appwrite/enums/project_key_scopes.rb +++ b/lib/appwrite/enums/project_key_scopes.rb @@ -94,6 +94,8 @@ module ProjectKeyScopes DOMAINS_READ = 'domains.read' DOMAINS_WRITE = 'domains.write' EVENTS_READ = 'events.read' + APPS_READ = 'apps.read' + APPS_WRITE = 'apps.write' USAGE_READ = 'usage.read' end end diff --git a/lib/appwrite/enums/project_policy_id.rb b/lib/appwrite/enums/project_policy_id.rb index 0c884c9..5e29823 100644 --- a/lib/appwrite/enums/project_policy_id.rb +++ b/lib/appwrite/enums/project_policy_id.rb @@ -3,6 +3,7 @@ module Enums module ProjectPolicyId PASSWORD_DICTIONARY = 'password-dictionary' PASSWORD_HISTORY = 'password-history' + PASSWORD_STRENGTH = 'password-strength' PASSWORD_PERSONAL_DATA = 'password-personal-data' SESSION_ALERT = 'session-alert' SESSION_DURATION = 'session-duration' diff --git a/lib/appwrite/models/policy_password_strength.rb b/lib/appwrite/models/policy_password_strength.rb new file mode 100644 index 0000000..0f712e4 --- /dev/null +++ b/lib/appwrite/models/policy_password_strength.rb @@ -0,0 +1,52 @@ +#frozen_string_literal: true + +module Appwrite + module Models + class PolicyPasswordStrength + attr_reader :id + attr_reader :min + attr_reader :uppercase + attr_reader :lowercase + attr_reader :number + attr_reader :symbols + + def initialize( + id:, + min:, + uppercase:, + lowercase:, + number:, + symbols: + ) + @id = id + @min = min + @uppercase = uppercase + @lowercase = lowercase + @number = number + @symbols = symbols + end + + def self.from(map:) + PolicyPasswordStrength.new( + id: map["$id"], + min: map["min"], + uppercase: map["uppercase"], + lowercase: map["lowercase"], + number: map["number"], + symbols: map["symbols"] + ) + end + + def to_map + { + "$id": @id, + "min": @min, + "uppercase": @uppercase, + "lowercase": @lowercase, + "number": @number, + "symbols": @symbols + } + end + end + end +end diff --git a/lib/appwrite/models/project.rb b/lib/appwrite/models/project.rb index 2f08d4c..519825e 100644 --- a/lib/appwrite/models/project.rb +++ b/lib/appwrite/models/project.rb @@ -8,6 +8,7 @@ class Project attr_reader :updated_at attr_reader :name attr_reader :team_id + attr_reader :region attr_reader :dev_keys attr_reader :smtp_enabled attr_reader :smtp_sender_name @@ -26,10 +27,18 @@ class Project attr_reader :auth_methods attr_reader :services attr_reader :protocols - attr_reader :region - attr_reader :billing_limits attr_reader :blocks attr_reader :console_accessed_at + attr_reader :billing_limits + attr_reader :o_auth2_server_enabled + attr_reader :o_auth2_server_authorization_url + attr_reader :o_auth2_server_scopes + attr_reader :o_auth2_server_access_token_duration + attr_reader :o_auth2_server_refresh_token_duration + attr_reader :o_auth2_server_public_access_token_duration + attr_reader :o_auth2_server_public_refresh_token_duration + attr_reader :o_auth2_server_confidential_pkce + attr_reader :o_auth2_server_discovery_url def initialize( id:, @@ -37,6 +46,7 @@ def initialize( updated_at:, name:, team_id:, + region:, dev_keys:, smtp_enabled:, smtp_sender_name:, @@ -55,16 +65,25 @@ def initialize( auth_methods:, services:, protocols:, - region:, - billing_limits: , blocks:, - console_accessed_at: + console_accessed_at:, + billing_limits: , + o_auth2_server_enabled:, + o_auth2_server_authorization_url:, + o_auth2_server_scopes:, + o_auth2_server_access_token_duration:, + o_auth2_server_refresh_token_duration:, + o_auth2_server_public_access_token_duration:, + o_auth2_server_public_refresh_token_duration:, + o_auth2_server_confidential_pkce:, + o_auth2_server_discovery_url: ) @id = id @created_at = created_at @updated_at = updated_at @name = name @team_id = team_id + @region = region @dev_keys = dev_keys @smtp_enabled = smtp_enabled @smtp_sender_name = smtp_sender_name @@ -83,10 +102,18 @@ def initialize( @auth_methods = auth_methods @services = services @protocols = protocols - @region = region - @billing_limits = billing_limits @blocks = blocks @console_accessed_at = console_accessed_at + @billing_limits = billing_limits + @o_auth2_server_enabled = o_auth2_server_enabled + @o_auth2_server_authorization_url = o_auth2_server_authorization_url + @o_auth2_server_scopes = o_auth2_server_scopes + @o_auth2_server_access_token_duration = o_auth2_server_access_token_duration + @o_auth2_server_refresh_token_duration = o_auth2_server_refresh_token_duration + @o_auth2_server_public_access_token_duration = o_auth2_server_public_access_token_duration + @o_auth2_server_public_refresh_token_duration = o_auth2_server_public_refresh_token_duration + @o_auth2_server_confidential_pkce = o_auth2_server_confidential_pkce + @o_auth2_server_discovery_url = o_auth2_server_discovery_url end def self.from(map:) @@ -96,6 +123,7 @@ def self.from(map:) updated_at: map["$updatedAt"], name: map["name"], team_id: map["teamId"], + region: map["region"], dev_keys: map["devKeys"].map { |it| DevKey.from(map: it) }, smtp_enabled: map["smtpEnabled"], smtp_sender_name: map["smtpSenderName"], @@ -114,10 +142,18 @@ def self.from(map:) auth_methods: map["authMethods"].map { |it| ProjectAuthMethod.from(map: it) }, services: map["services"].map { |it| ProjectService.from(map: it) }, protocols: map["protocols"].map { |it| ProjectProtocol.from(map: it) }, - region: map["region"], - billing_limits: BillingLimits.from(map: map["billingLimits"]), blocks: map["blocks"].map { |it| Block.from(map: it) }, - console_accessed_at: map["consoleAccessedAt"] + console_accessed_at: map["consoleAccessedAt"], + billing_limits: BillingLimits.from(map: map["billingLimits"]), + o_auth2_server_enabled: map["oAuth2ServerEnabled"], + o_auth2_server_authorization_url: map["oAuth2ServerAuthorizationUrl"], + o_auth2_server_scopes: map["oAuth2ServerScopes"], + o_auth2_server_access_token_duration: map["oAuth2ServerAccessTokenDuration"], + o_auth2_server_refresh_token_duration: map["oAuth2ServerRefreshTokenDuration"], + o_auth2_server_public_access_token_duration: map["oAuth2ServerPublicAccessTokenDuration"], + o_auth2_server_public_refresh_token_duration: map["oAuth2ServerPublicRefreshTokenDuration"], + o_auth2_server_confidential_pkce: map["oAuth2ServerConfidentialPkce"], + o_auth2_server_discovery_url: map["oAuth2ServerDiscoveryUrl"] ) end @@ -128,6 +164,7 @@ def to_map "$updatedAt": @updated_at, "name": @name, "teamId": @team_id, + "region": @region, "devKeys": @dev_keys.map { |it| it.to_map }, "smtpEnabled": @smtp_enabled, "smtpSenderName": @smtp_sender_name, @@ -146,10 +183,18 @@ def to_map "authMethods": @auth_methods.map { |it| it.to_map }, "services": @services.map { |it| it.to_map }, "protocols": @protocols.map { |it| it.to_map }, - "region": @region, - "billingLimits": @billing_limits.to_map, "blocks": @blocks.map { |it| it.to_map }, - "consoleAccessedAt": @console_accessed_at + "consoleAccessedAt": @console_accessed_at, + "billingLimits": @billing_limits.to_map, + "oAuth2ServerEnabled": @o_auth2_server_enabled, + "oAuth2ServerAuthorizationUrl": @o_auth2_server_authorization_url, + "oAuth2ServerScopes": @o_auth2_server_scopes, + "oAuth2ServerAccessTokenDuration": @o_auth2_server_access_token_duration, + "oAuth2ServerRefreshTokenDuration": @o_auth2_server_refresh_token_duration, + "oAuth2ServerPublicAccessTokenDuration": @o_auth2_server_public_access_token_duration, + "oAuth2ServerPublicRefreshTokenDuration": @o_auth2_server_public_refresh_token_duration, + "oAuth2ServerConfidentialPkce": @o_auth2_server_confidential_pkce, + "oAuth2ServerDiscoveryUrl": @o_auth2_server_discovery_url } end end diff --git a/lib/appwrite/services/account.rb b/lib/appwrite/services/account.rb index d84c55a..068b478 100644 --- a/lib/appwrite/services/account.rb +++ b/lib/appwrite/services/account.rb @@ -18,6 +18,7 @@ def get() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -67,6 +68,7 @@ def create(user_id:, email:, password:, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -110,6 +112,7 @@ def update_email(email:, password:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -138,6 +141,7 @@ def list_identities(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -167,6 +171,7 @@ def delete_identity(identity_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -196,6 +201,7 @@ def create_jwt(duration: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -225,6 +231,7 @@ def list_logs(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -254,6 +261,7 @@ def update_mfa(mfa:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -287,6 +295,7 @@ def create_mfa_authenticator(type:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -325,6 +334,7 @@ def update_mfa_authenticator(type:, otp:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -355,6 +365,7 @@ def delete_mfa_authenticator(type:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -386,6 +397,7 @@ def create_mfa_challenge(factor:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -426,6 +438,7 @@ def update_mfa_challenge(challenge_id:, otp:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -450,6 +463,7 @@ def list_mfa_factors() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -476,6 +490,7 @@ def get_mfa_recovery_codes() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -503,6 +518,7 @@ def create_mfa_recovery_codes() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -530,6 +546,7 @@ def update_mfa_recovery_codes() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -560,6 +577,7 @@ def update_name(name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -578,7 +596,7 @@ def update_name(name:) # OAuth, Team Invites and Magic URL, oldPassword is optional. # # @param [String] password New user password. Must be at least 8 chars. - # @param [String] old_password Current user password. Must be at least 8 chars. + # @param [String] old_password Current user password. Max length: 256 chars. # # @return [User] def update_password(password:, old_password: nil) @@ -594,6 +612,7 @@ def update_password(password:, old_password: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -634,6 +653,7 @@ def update_phone(phone:, password:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -658,6 +678,7 @@ def get_prefs() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -689,6 +710,7 @@ def update_prefs(prefs:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -732,6 +754,7 @@ def create_recovery(email:, url:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -783,6 +806,7 @@ def update_recovery(user_id:, secret:, password:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -808,6 +832,7 @@ def list_sessions() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -832,6 +857,7 @@ def delete_sessions() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -861,6 +887,7 @@ def create_anonymous_session() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -902,6 +929,7 @@ def create_email_password_session(email:, password:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -943,6 +971,7 @@ def update_magic_url_session(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -984,6 +1013,7 @@ def update_phone_session(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1022,6 +1052,7 @@ def create_session(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1053,6 +1084,7 @@ def get_session(session_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1084,6 +1116,7 @@ def update_session(session_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1118,6 +1151,7 @@ def delete_session(session_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1143,6 +1177,7 @@ def update_status() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1194,6 +1229,7 @@ def create_email_token(user_id:, email:, phrase: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1247,6 +1283,7 @@ def create_magic_url_token(user_id:, email:, url: nil, phrase: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1296,6 +1333,7 @@ def create_o_auth2_token(provider:, success: nil, failure: nil, scopes: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1340,6 +1378,7 @@ def create_phone_token(user_id:, phone:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1384,6 +1423,7 @@ def create_email_verification(url:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1431,6 +1471,7 @@ def create_verification(url:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1470,6 +1511,7 @@ def update_email_verification(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1512,6 +1554,7 @@ def update_verification(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1543,6 +1586,7 @@ def create_phone_verification() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1582,6 +1626,7 @@ def update_phone_verification(user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/activities.rb b/lib/appwrite/services/activities.rb index e3528c3..c8d94a7 100644 --- a/lib/appwrite/services/activities.rb +++ b/lib/appwrite/services/activities.rb @@ -20,6 +20,7 @@ def list_events(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -50,6 +51,7 @@ def get_event(event_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/advisor.rb b/lib/appwrite/services/advisor.rb index 864025c..83703be 100644 --- a/lib/appwrite/services/advisor.rb +++ b/lib/appwrite/services/advisor.rb @@ -24,6 +24,7 @@ def list_reports(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -55,6 +56,7 @@ def get_report(report_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -86,6 +88,7 @@ def delete_report(report_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -121,6 +124,7 @@ def list_insights(report_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -157,6 +161,7 @@ def get_insight(report_id:, insight_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/avatars.rb b/lib/appwrite/services/avatars.rb index a80191f..9d8d9d9 100644 --- a/lib/appwrite/services/avatars.rb +++ b/lib/appwrite/services/avatars.rb @@ -39,6 +39,7 @@ def get_browser(code:, width: nil, height: nil, quality: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -81,6 +82,7 @@ def get_credit_card(code:, width: nil, height: nil, quality: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -112,6 +114,7 @@ def get_favicon(url:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -155,6 +158,7 @@ def get_flag(code:, width: nil, height: nil, quality: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -197,6 +201,7 @@ def get_image(url:, width: nil, height: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -242,6 +247,7 @@ def get_initials(name: nil, width: nil, height: nil, background: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -278,6 +284,7 @@ def get_qr(text:, size: nil, margin: nil, download: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -353,6 +360,7 @@ def get_screenshot(url:, headers: nil, viewport_width: nil, viewport_height: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/backups.rb b/lib/appwrite/services/backups.rb index 63e109a..bb9432b 100644 --- a/lib/appwrite/services/backups.rb +++ b/lib/appwrite/services/backups.rb @@ -20,6 +20,7 @@ def list_archives(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -51,6 +52,7 @@ def create_archive(services:, resource_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -81,6 +83,7 @@ def get_archive(archive_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -110,6 +113,7 @@ def delete_archive(archive_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -135,6 +139,7 @@ def list_policies(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -188,6 +193,7 @@ def create_policy(policy_id:, services:, retention:, schedule:, name: nil, resou } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -218,6 +224,7 @@ def get_policy(policy_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -255,6 +262,7 @@ def update_policy(policy_id:, name: nil, retention: nil, schedule: nil, enabled: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -285,6 +293,7 @@ def delete_policy(policy_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -324,6 +333,7 @@ def create_restoration(archive_id:, services:, new_resource_id: nil, new_resourc } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -350,6 +360,7 @@ def list_restorations(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -379,6 +390,7 @@ def get_restoration(restoration_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/databases.rb b/lib/appwrite/services/databases.rb index e5f4c2e..354cc88 100644 --- a/lib/appwrite/services/databases.rb +++ b/lib/appwrite/services/databases.rb @@ -28,6 +28,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -69,6 +70,7 @@ def create(database_id:, name:, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -95,6 +97,7 @@ def list_transactions(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -120,6 +123,7 @@ def create_transaction(ttl: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -150,6 +154,7 @@ def get_transaction(transaction_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -183,6 +188,7 @@ def update_transaction(transaction_id:, commit: nil, rollback: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -213,6 +219,7 @@ def delete_transaction(transaction_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -244,6 +251,7 @@ def create_operations(transaction_id:, operations: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -278,6 +286,7 @@ def get(database_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -314,6 +323,7 @@ def update(database_id:, name: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -348,6 +358,7 @@ def delete(database_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -387,6 +398,7 @@ def list_collections(database_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -444,6 +456,7 @@ def create_collection(database_id:, collection_id:, name:, permissions: nil, doc } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -484,6 +497,7 @@ def get_collection(database_id:, collection_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -532,6 +546,7 @@ def update_collection(database_id:, collection_id:, name: nil, permissions: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -572,6 +587,7 @@ def delete_collection(database_id:, collection_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -614,6 +630,7 @@ def list_attributes(database_id:, collection_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -674,6 +691,7 @@ def create_big_int_attribute(database_id:, collection_id:, key:, required:, min: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -739,6 +757,7 @@ def update_big_int_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -795,6 +814,7 @@ def create_boolean_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -855,6 +875,7 @@ def update_boolean_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -910,6 +931,7 @@ def create_datetime_attribute(database_id:, collection_id:, key:, required:, def } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -970,6 +992,7 @@ def update_datetime_attribute(database_id:, collection_id:, key:, required:, def } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1026,6 +1049,7 @@ def create_email_attribute(database_id:, collection_id:, key:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1087,6 +1111,7 @@ def update_email_attribute(database_id:, collection_id:, key:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1150,6 +1175,7 @@ def create_enum_attribute(database_id:, collection_id:, key:, elements:, require } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1217,6 +1243,7 @@ def update_enum_attribute(database_id:, collection_id:, key:, elements:, require } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1278,6 +1305,7 @@ def create_float_attribute(database_id:, collection_id:, key:, required:, min: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1343,6 +1371,7 @@ def update_float_attribute(database_id:, collection_id:, key:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1404,6 +1433,7 @@ def create_integer_attribute(database_id:, collection_id:, key:, required:, min: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1469,6 +1499,7 @@ def update_integer_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1525,6 +1556,7 @@ def create_ip_attribute(database_id:, collection_id:, key:, required:, default: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1586,6 +1618,7 @@ def update_ip_attribute(database_id:, collection_id:, key:, required:, default:, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1639,6 +1672,7 @@ def create_line_attribute(database_id:, collection_id:, key:, required:, default } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1695,6 +1729,7 @@ def update_line_attribute(database_id:, collection_id:, key:, required:, default } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1750,6 +1785,7 @@ def create_longtext_attribute(database_id:, collection_id:, key:, required:, def } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1808,6 +1844,7 @@ def update_longtext_attribute(database_id:, collection_id:, key:, required:, def } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1863,6 +1900,7 @@ def create_mediumtext_attribute(database_id:, collection_id:, key:, required:, d } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1921,6 +1959,7 @@ def update_mediumtext_attribute(database_id:, collection_id:, key:, required:, d } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1974,6 +2013,7 @@ def create_point_attribute(database_id:, collection_id:, key:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2030,6 +2070,7 @@ def update_point_attribute(database_id:, collection_id:, key:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2083,6 +2124,7 @@ def create_polygon_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2139,6 +2181,7 @@ def update_polygon_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2200,6 +2243,7 @@ def create_relationship_attribute(database_id:, collection_id:, related_collecti } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2251,6 +2295,7 @@ def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2315,6 +2360,7 @@ def create_string_attribute(database_id:, collection_id:, key:, size:, required: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2378,6 +2424,7 @@ def update_string_attribute(database_id:, collection_id:, key:, required:, defau } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2433,6 +2480,7 @@ def create_text_attribute(database_id:, collection_id:, key:, required:, default } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2491,6 +2539,7 @@ def update_text_attribute(database_id:, collection_id:, key:, required:, default } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2547,6 +2596,7 @@ def create_url_attribute(database_id:, collection_id:, key:, required:, default: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2608,6 +2658,7 @@ def update_url_attribute(database_id:, collection_id:, key:, required:, default: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2669,6 +2720,7 @@ def create_varchar_attribute(database_id:, collection_id:, key:, size:, required } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2729,6 +2781,7 @@ def update_varchar_attribute(database_id:, collection_id:, key:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2774,6 +2827,7 @@ def get_attribute(database_id:, collection_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } response = @client.call( @@ -2873,6 +2927,7 @@ def delete_attribute(database_id:, collection_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2920,6 +2975,7 @@ def list_documents(database_id:, collection_id:, queries: nil, transaction_id: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -2977,6 +3033,7 @@ def create_document(database_id:, collection_id:, document_id:, data:, permissio } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3027,6 +3084,7 @@ def create_documents(database_id:, collection_id:, documents:, transaction_id: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3078,6 +3136,7 @@ def upsert_documents(database_id:, collection_id:, documents:, transaction_id: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3125,6 +3184,7 @@ def update_documents(database_id:, collection_id:, data: nil, queries: nil, tran } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3169,6 +3229,7 @@ def delete_documents(database_id:, collection_id:, queries: nil, transaction_id: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3219,6 +3280,7 @@ def get_document(database_id:, collection_id:, document_id:, queries: nil, trans } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3272,6 +3334,7 @@ def upsert_document(database_id:, collection_id:, document_id:, data: nil, permi } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3324,6 +3387,7 @@ def update_document(database_id:, collection_id:, document_id:, data: nil, permi } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3371,6 +3435,7 @@ def delete_document(database_id:, collection_id:, document_id:, transaction_id: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3427,6 +3492,7 @@ def decrement_document_attribute(database_id:, collection_id:, document_id:, att } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3484,6 +3550,7 @@ def increment_document_attribute(database_id:, collection_id:, document_id:, att } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3527,6 +3594,7 @@ def list_indexes(database_id:, collection_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3589,6 +3657,7 @@ def create_index(database_id:, collection_id:, key:, type:, attributes:, orders: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3634,6 +3703,7 @@ def get_index(database_id:, collection_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3678,6 +3748,7 @@ def delete_index(database_id:, collection_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/functions.rb b/lib/appwrite/services/functions.rb index a1d5cb1..c622b6b 100644 --- a/lib/appwrite/services/functions.rb +++ b/lib/appwrite/services/functions.rb @@ -25,6 +25,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -107,6 +108,7 @@ def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -131,6 +133,7 @@ def list_runtimes() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -154,6 +157,7 @@ def list_specifications() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -183,6 +187,7 @@ def get(function_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -258,6 +263,7 @@ def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -288,6 +294,7 @@ def delete(function_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -324,6 +331,7 @@ def update_function_deployment(function_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -361,6 +369,7 @@ def list_deployments(function_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -415,6 +424,7 @@ def create_deployment(function_id:, code:, activate:, entrypoint: nil, commands: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'multipart/form-data', } @@ -462,6 +472,7 @@ def create_duplicate_deployment(function_id:, deployment_id:, build_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -528,6 +539,7 @@ def create_template_deployment(function_id:, repository:, owner:, root_directory } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -574,6 +586,7 @@ def create_vcs_deployment(function_id:, type:, reference:, activate: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -610,6 +623,7 @@ def get_deployment(function_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -645,6 +659,7 @@ def delete_deployment(function_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -684,6 +699,7 @@ def get_deployment_download(function_id:, deployment_id:, type: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -722,6 +738,7 @@ def update_deployment_status(function_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -757,6 +774,7 @@ def list_executions(function_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -801,6 +819,7 @@ def create_execution(function_id:, body: nil, async: nil, xpath: nil, method: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -837,6 +856,7 @@ def get_execution(function_id:, execution_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -872,6 +892,7 @@ def delete_execution(function_id:, execution_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -905,6 +926,7 @@ def list_variables(function_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -955,6 +977,7 @@ def create_variable(function_id:, variable_id:, key:, value:, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -991,6 +1014,7 @@ def get_variable(function_id:, variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1032,6 +1056,7 @@ def update_variable(function_id:, variable_id:, key: nil, value: nil, secret: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1068,6 +1093,7 @@ def delete_variable(function_id:, variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/graphql.rb b/lib/appwrite/services/graphql.rb index 171e9ae..8f3c6aa 100644 --- a/lib/appwrite/services/graphql.rb +++ b/lib/appwrite/services/graphql.rb @@ -24,6 +24,7 @@ def query(query:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "x-sdk-graphql": 'true', "content-type": 'application/json', } @@ -54,6 +55,7 @@ def mutation(query:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "x-sdk-graphql": 'true', "content-type": 'application/json', } diff --git a/lib/appwrite/services/health.rb b/lib/appwrite/services/health.rb index ed23fde..fbd59ef 100644 --- a/lib/appwrite/services/health.rb +++ b/lib/appwrite/services/health.rb @@ -18,6 +18,7 @@ def get() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -41,6 +42,7 @@ def get_antivirus() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -53,6 +55,33 @@ def get_antivirus() end + # Check the database that backs the audit and activity store. When the + # connection is reachable the endpoint returns a passing status with its + # response time. + # + # + # + # @return [HealthStatusList] + def get_audits_db() + api_path = '/health/audits-db' + + api_params = { + } + + api_headers = { + "X-Appwrite-Project": @client.get_config('project'), + } + + @client.call( + method: 'GET', + path: api_path, + headers: api_headers, + params: api_params, + response_type: Models::HealthStatusList + ) + + end + # Check the Appwrite in-memory cache servers are up and connection is # successful. # @@ -65,6 +94,7 @@ def get_cache() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -90,6 +120,7 @@ def get_certificate(domain: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -119,6 +150,7 @@ def get_console_pausing(threshold: nil, inactivity_days: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -142,6 +174,7 @@ def get_db() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -165,6 +198,7 @@ def get_pub_sub() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -192,6 +226,7 @@ def get_queue_audits(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -218,6 +253,7 @@ def get_queue_builds(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -245,6 +281,7 @@ def get_queue_certificates(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -273,6 +310,7 @@ def get_queue_databases(name: nil, threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -299,6 +337,7 @@ def get_queue_deletes(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -331,6 +370,7 @@ def get_failed_jobs(name:, threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -357,6 +397,7 @@ def get_queue_functions(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -383,6 +424,7 @@ def get_queue_logs(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -409,6 +451,7 @@ def get_queue_mails(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -435,6 +478,7 @@ def get_queue_messaging(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -461,6 +505,7 @@ def get_queue_migrations(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -487,6 +532,7 @@ def get_queue_stats_resources(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -513,6 +559,7 @@ def get_queue_usage(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -539,6 +586,7 @@ def get_queue_webhooks(threshold: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -562,6 +610,7 @@ def get_storage() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -585,6 +634,7 @@ def get_storage_local() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -614,6 +664,7 @@ def get_time() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/locale.rb b/lib/appwrite/services/locale.rb index b2be273..103f4f4 100644 --- a/lib/appwrite/services/locale.rb +++ b/lib/appwrite/services/locale.rb @@ -23,6 +23,7 @@ def get() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -47,6 +48,7 @@ def list_codes() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -71,6 +73,7 @@ def list_continents() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -95,6 +98,7 @@ def list_countries() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -119,6 +123,7 @@ def list_countries_eu() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -143,6 +148,7 @@ def list_countries_phones() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -168,6 +174,7 @@ def list_currencies() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -192,6 +199,7 @@ def list_languages() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/messaging.rb b/lib/appwrite/services/messaging.rb index 7840c34..0ebf8f7 100644 --- a/lib/appwrite/services/messaging.rb +++ b/lib/appwrite/services/messaging.rb @@ -24,6 +24,7 @@ def list_messages(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -83,6 +84,7 @@ def create_email(message_id:, subject:, content:, topics: nil, users: nil, targe } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -138,6 +140,7 @@ def update_email(message_id:, topics: nil, users: nil, targets: nil, subject: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -204,6 +207,7 @@ def create_push(message_id:, title: nil, body: nil, topics: nil, users: nil, tar } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -273,6 +277,7 @@ def update_push(message_id:, topics: nil, users: nil, targets: nil, title: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -319,6 +324,7 @@ def create_sms(message_id:, content:, topics: nil, users: nil, targets: nil, dra } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -364,6 +370,7 @@ def update_sms(message_id:, topics: nil, users: nil, targets: nil, content: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -395,6 +402,7 @@ def get_message(message_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -425,6 +433,7 @@ def delete(message_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -458,6 +467,7 @@ def list_message_logs(message_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -491,6 +501,7 @@ def list_targets(message_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -520,6 +531,7 @@ def list_providers(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -567,6 +579,7 @@ def create_apns_provider(provider_id:, name:, auth_key: nil, auth_key_id: nil, t } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -611,6 +624,7 @@ def update_apns_provider(provider_id:, name: nil, enabled: nil, auth_key: nil, a } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -651,6 +665,7 @@ def create_fcm_provider(provider_id:, name:, service_account_json: nil, enabled: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -687,6 +702,7 @@ def update_fcm_provider(provider_id:, name: nil, enabled: nil, service_account_j } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -739,6 +755,7 @@ def create_mailgun_provider(provider_id:, name:, api_key: nil, domain: nil, is_e } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -787,6 +804,7 @@ def update_mailgun_provider(provider_id:, name: nil, api_key: nil, domain: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -831,6 +849,7 @@ def create_msg91_provider(provider_id:, name:, template_id: nil, sender_id: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -871,6 +890,7 @@ def update_msg91_provider(provider_id:, name: nil, enabled: nil, template_id: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -919,6 +939,7 @@ def create_resend_provider(provider_id:, name:, api_key: nil, from_name: nil, fr } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -963,6 +984,7 @@ def update_resend_provider(provider_id:, name: nil, enabled: nil, api_key: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1011,6 +1033,7 @@ def create_sendgrid_provider(provider_id:, name:, api_key: nil, from_name: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1055,6 +1078,109 @@ def update_sendgrid_provider(provider_id:, name: nil, enabled: nil, api_key: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), + "content-type": 'application/json', + } + + @client.call( + method: 'PATCH', + path: api_path, + headers: api_headers, + params: api_params, + response_type: Models::Provider + ) + + end + + # Create a new Amazon SES provider. + # + # @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. + # @param [String] name Provider name. + # @param [String] access_key AWS access key ID. + # @param [String] secret_key AWS secret access key. + # @param [String] region AWS region, for example us-east-1. + # @param [String] from_name Sender Name. + # @param [String] from_email Sender email address. + # @param [String] reply_to_name Name set in the reply to field for the mail. Default value is sender name. + # @param [String] reply_to_email Email set in the reply to field for the mail. Default value is sender email. + # @param [] enabled Set as enabled. + # + # @return [Provider] + def create_ses_provider(provider_id:, name:, access_key: nil, secret_key: nil, region: nil, from_name: nil, from_email: nil, reply_to_name: nil, reply_to_email: nil, enabled: nil) + api_path = '/messaging/providers/ses' + + if provider_id.nil? + raise Appwrite::Exception.new('Missing required parameter: "providerId"') + end + + if name.nil? + raise Appwrite::Exception.new('Missing required parameter: "name"') + end + + api_params = { + providerId: provider_id, + name: name, + accessKey: access_key, + secretKey: secret_key, + region: region, + fromName: from_name, + fromEmail: from_email, + replyToName: reply_to_name, + replyToEmail: reply_to_email, + enabled: enabled, + } + + api_headers = { + "X-Appwrite-Project": @client.get_config('project'), + "content-type": 'application/json', + } + + @client.call( + method: 'POST', + path: api_path, + headers: api_headers, + params: api_params, + response_type: Models::Provider + ) + + end + + # Update an Amazon SES provider by its unique ID. + # + # @param [String] provider_id Provider ID. + # @param [String] name Provider name. + # @param [] enabled Set as enabled. + # @param [String] access_key AWS access key ID. + # @param [String] secret_key AWS secret access key. + # @param [String] region AWS region, for example us-east-1. + # @param [String] from_name Sender Name. + # @param [String] from_email Sender email address. + # @param [String] reply_to_name Name set in the Reply To field for the mail. Default value is Sender Name. + # @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email. + # + # @return [Provider] + def update_ses_provider(provider_id:, name: nil, enabled: nil, access_key: nil, secret_key: nil, region: nil, from_name: nil, from_email: nil, reply_to_name: nil, reply_to_email: nil) + api_path = '/messaging/providers/ses/{providerId}' + .gsub('{providerId}', provider_id) + + if provider_id.nil? + raise Appwrite::Exception.new('Missing required parameter: "providerId"') + end + + api_params = { + name: name, + enabled: enabled, + accessKey: access_key, + secretKey: secret_key, + region: region, + fromName: from_name, + fromEmail: from_email, + replyToName: reply_to_name, + replyToEmail: reply_to_email, + } + + api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1119,6 +1245,7 @@ def create_smtp_provider(provider_id:, name:, host:, port: nil, username: nil, p } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1175,6 +1302,7 @@ def update_smtp_provider(provider_id:, name: nil, host: nil, port: nil, username } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1219,6 +1347,7 @@ def create_telesign_provider(provider_id:, name:, from: nil, customer_id: nil, a } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1259,6 +1388,7 @@ def update_telesign_provider(provider_id:, name: nil, enabled: nil, customer_id: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1303,6 +1433,7 @@ def create_textmagic_provider(provider_id:, name:, from: nil, username: nil, api } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1343,6 +1474,7 @@ def update_textmagic_provider(provider_id:, name: nil, enabled: nil, username: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1387,6 +1519,7 @@ def create_twilio_provider(provider_id:, name:, from: nil, account_sid: nil, aut } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1427,6 +1560,7 @@ def update_twilio_provider(provider_id:, name: nil, enabled: nil, account_sid: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1471,6 +1605,7 @@ def create_vonage_provider(provider_id:, name:, from: nil, api_key: nil, api_sec } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1511,6 +1646,7 @@ def update_vonage_provider(provider_id:, name: nil, enabled: nil, api_key: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1542,6 +1678,7 @@ def get_provider(provider_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1571,6 +1708,7 @@ def delete_provider(provider_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1604,6 +1742,7 @@ def list_provider_logs(provider_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1637,6 +1776,7 @@ def list_subscriber_logs(subscriber_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1666,6 +1806,7 @@ def list_topics(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1703,6 +1844,7 @@ def create_topic(topic_id:, name:, subscribe: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1734,6 +1876,7 @@ def get_topic(topic_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1768,6 +1911,7 @@ def update_topic(topic_id:, name: nil, subscribe: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1798,6 +1942,7 @@ def delete_topic(topic_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1831,6 +1976,7 @@ def list_topic_logs(topic_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1866,6 +2012,7 @@ def list_subscribers(topic_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1907,6 +2054,7 @@ def create_subscriber(topic_id:, subscriber_id:, target_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1944,6 +2092,7 @@ def get_subscriber(topic_id:, subscriber_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1979,6 +2128,7 @@ def delete_subscriber(topic_id:, subscriber_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/organization.rb b/lib/appwrite/services/organization.rb index 31cc799..77d626d 100644 --- a/lib/appwrite/services/organization.rb +++ b/lib/appwrite/services/organization.rb @@ -22,6 +22,7 @@ def list_keys(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -65,6 +66,7 @@ def create_key(key_id:, name:, scopes:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -96,6 +98,7 @@ def get_key(key_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -140,6 +143,7 @@ def update_key(key_id:, name:, scopes:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -171,6 +175,7 @@ def delete_key(key_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -201,6 +206,7 @@ def list_projects(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -238,6 +244,7 @@ def create_project(project_id:, name:, region: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -268,6 +275,7 @@ def get_project(project_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -303,6 +311,7 @@ def update_project(project_id:, name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -333,6 +342,7 @@ def delete_project(project_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/presences.rb b/lib/appwrite/services/presences.rb index 830a7c6..a839b01 100644 --- a/lib/appwrite/services/presences.rb +++ b/lib/appwrite/services/presences.rb @@ -25,6 +25,7 @@ def list(queries: nil, total: nil, ttl: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -56,6 +57,7 @@ def get(presence_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -104,6 +106,7 @@ def upsert(presence_id:, user_id:, status:, permissions: nil, expires_at: nil, m } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -152,6 +155,7 @@ def update(presence_id:, user_id:, status: nil, expires_at: nil, metadata: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -183,6 +187,7 @@ def delete(presence_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/project.rb b/lib/appwrite/services/project.rb index 4c37f9b..d71c096 100644 --- a/lib/appwrite/services/project.rb +++ b/lib/appwrite/services/project.rb @@ -18,6 +18,7 @@ def get() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -41,6 +42,7 @@ def delete() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -77,6 +79,7 @@ def update_auth_method(method_id:, enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -105,6 +108,7 @@ def list_keys(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -152,6 +156,7 @@ def create_key(key_id:, name:, scopes:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -192,6 +197,7 @@ def create_ephemeral_key(scopes:, duration:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -222,6 +228,7 @@ def get_key(key_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -266,6 +273,7 @@ def update_key(key_id:, name:, scopes:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -297,6 +305,7 @@ def delete_key(key_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -327,6 +336,7 @@ def update_labels(labels:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -356,6 +366,7 @@ def list_mock_phones(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -392,6 +403,7 @@ def create_mock_phone(number:, otp:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -423,6 +435,7 @@ def get_mock_phone(number:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -459,6 +472,7 @@ def update_mock_phone(number:, otp:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -490,6 +504,7 @@ def delete_mock_phone(number:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -519,6 +534,7 @@ def list_o_auth2_providers(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -531,10 +547,59 @@ def list_o_auth2_providers(queries: nil, total: nil) end + # Update the OAuth2 server (OIDC provider) configuration. + # + # @param [] enabled Enable or disable the OAuth2 server. + # @param [String] authorization_url URL to your application with consent screen. + # @param [Array] scopes List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long. + # @param [Integer] access_token_duration Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours. + # @param [Integer] refresh_token_duration Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year. + # @param [Integer] public_access_token_duration Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour. + # @param [Integer] public_refresh_token_duration Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days. + # @param [] confidential_pkce When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting. + # + # @return [Project] + def update_o_auth2_server(enabled:, authorization_url:, scopes: nil, access_token_duration: nil, refresh_token_duration: nil, public_access_token_duration: nil, public_refresh_token_duration: nil, confidential_pkce: nil) + api_path = '/project/oauth2-server' + + if enabled.nil? + raise Appwrite::Exception.new('Missing required parameter: "enabled"') + end + + if authorization_url.nil? + raise Appwrite::Exception.new('Missing required parameter: "authorizationUrl"') + end + + api_params = { + enabled: enabled, + authorizationUrl: authorization_url, + scopes: scopes, + accessTokenDuration: access_token_duration, + refreshTokenDuration: refresh_token_duration, + publicAccessTokenDuration: public_access_token_duration, + publicRefreshTokenDuration: public_refresh_token_duration, + confidentialPkce: confidential_pkce, + } + + api_headers = { + "X-Appwrite-Project": @client.get_config('project'), + "content-type": 'application/json', + } + + @client.call( + method: 'PUT', + path: api_path, + headers: api_headers, + params: api_params, + response_type: Models::Project + ) + + end + # Update the project OAuth2 Amazon configuration. # # @param [String] client_id 'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2 - # @param [String] client_secret 'Client Secret' of Amazon OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Amazon] @@ -548,6 +613,7 @@ def update_o_auth2_amazon(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -582,6 +648,7 @@ def update_o_auth2_apple(service_id: nil, key_id: nil, team_id: nil, p8_file: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -598,7 +665,7 @@ def update_o_auth2_apple(service_id: nil, key_id: nil, team_id: nil, p8_file: ni # Update the project OAuth2 Auth0 configuration. # # @param [String] client_id 'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq - # @param [String] client_secret 'Client Secret' of Auth0 OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF # @param [String] endpoint Domain of Auth0 instance. For example: example.us.auth0.com # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -614,6 +681,7 @@ def update_o_auth2_auth0(client_id: nil, client_secret: nil, endpoint: nil, enab } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -630,7 +698,7 @@ def update_o_auth2_auth0(client_id: nil, client_secret: nil, endpoint: nil, enab # Update the project OAuth2 Authentik configuration. # # @param [String] client_id 'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv - # @param [String] client_secret 'Client Secret' of Authentik OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK # @param [String] endpoint Domain of Authentik instance. For example: example.authentik.com # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -646,6 +714,7 @@ def update_o_auth2_authentik(client_id: nil, client_secret: nil, endpoint: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -662,7 +731,7 @@ def update_o_auth2_authentik(client_id: nil, client_secret: nil, endpoint: nil, # Update the project OAuth2 Autodesk configuration. # # @param [String] client_id 'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7 - # @param [String] client_secret 'Client Secret' of Autodesk OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Autodesk] @@ -676,6 +745,7 @@ def update_o_auth2_autodesk(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -692,7 +762,7 @@ def update_o_auth2_autodesk(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Bitbucket configuration. # # @param [String] key 'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc - # @param [String] secret 'Secret' of Bitbucket OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret 'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Bitbucket] @@ -706,6 +776,7 @@ def update_o_auth2_bitbucket(key: nil, secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -722,7 +793,7 @@ def update_o_auth2_bitbucket(key: nil, secret: nil, enabled: nil) # Update the project OAuth2 Bitly configuration. # # @param [String] client_id 'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b - # @param [String] client_secret 'Client Secret' of Bitly OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Bitly] @@ -736,6 +807,7 @@ def update_o_auth2_bitly(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -752,7 +824,7 @@ def update_o_auth2_bitly(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Box configuration. # # @param [String] client_id 'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y - # @param [String] client_secret 'Client Secret' of Box OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Box] @@ -766,6 +838,7 @@ def update_o_auth2_box(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -782,7 +855,7 @@ def update_o_auth2_box(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Dailymotion configuration. # # @param [String] api_key 'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f - # @param [String] api_secret 'API Secret' of Dailymotion OAuth2 app. For example: your-oauth2-client-secret + # @param [String] api_secret 'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Dailymotion] @@ -796,6 +869,7 @@ def update_o_auth2_dailymotion(api_key: nil, api_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -812,7 +886,7 @@ def update_o_auth2_dailymotion(api_key: nil, api_secret: nil, enabled: nil) # Update the project OAuth2 Discord configuration. # # @param [String] client_id 'Client ID' of Discord OAuth2 app. For example: 950722000000343754 - # @param [String] client_secret 'Client Secret' of Discord OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Discord] @@ -826,6 +900,7 @@ def update_o_auth2_discord(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -842,7 +917,7 @@ def update_o_auth2_discord(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Disqus configuration. # # @param [String] public_key 'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX - # @param [String] secret_key 'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret_key 'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Disqus] @@ -856,6 +931,7 @@ def update_o_auth2_disqus(public_key: nil, secret_key: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -872,7 +948,7 @@ def update_o_auth2_disqus(public_key: nil, secret_key: nil, enabled: nil) # Update the project OAuth2 Dropbox configuration. # # @param [String] app_key 'App Key' of Dropbox OAuth2 app. For example: jl000000000009t - # @param [String] app_secret 'App Secret' of Dropbox OAuth2 app. For example: your-oauth2-client-secret + # @param [String] app_secret 'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Dropbox] @@ -886,6 +962,7 @@ def update_o_auth2_dropbox(app_key: nil, app_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -902,7 +979,7 @@ def update_o_auth2_dropbox(app_key: nil, app_secret: nil, enabled: nil) # Update the project OAuth2 Etsy configuration. # # @param [String] key_string 'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2 - # @param [String] shared_secret 'Shared Secret' of Etsy OAuth2 app. For example: your-oauth2-client-secret + # @param [String] shared_secret 'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Etsy] @@ -916,6 +993,7 @@ def update_o_auth2_etsy(key_string: nil, shared_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -932,7 +1010,7 @@ def update_o_auth2_etsy(key_string: nil, shared_secret: nil, enabled: nil) # Update the project OAuth2 Facebook configuration. # # @param [String] app_id 'App ID' of Facebook OAuth2 app. For example: 260600000007694 - # @param [String] app_secret 'App Secret' of Facebook OAuth2 app. For example: your-oauth2-client-secret + # @param [String] app_secret 'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Facebook] @@ -946,6 +1024,7 @@ def update_o_auth2_facebook(app_id: nil, app_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -962,7 +1041,7 @@ def update_o_auth2_facebook(app_id: nil, app_secret: nil, enabled: nil) # Update the project OAuth2 Figma configuration. # # @param [String] client_id 'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40 - # @param [String] client_secret 'Client Secret' of Figma OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Figma] @@ -976,6 +1055,7 @@ def update_o_auth2_figma(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -992,7 +1072,7 @@ def update_o_auth2_figma(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 FusionAuth configuration. # # @param [String] client_id 'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097 - # @param [String] client_secret 'Client Secret' of FusionAuth OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc # @param [String] endpoint Domain of FusionAuth instance. For example: example.fusionauth.io # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -1008,6 +1088,7 @@ def update_o_auth2_fusion_auth(client_id: nil, client_secret: nil, endpoint: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1024,7 +1105,7 @@ def update_o_auth2_fusion_auth(client_id: nil, client_secret: nil, endpoint: nil # Update the project OAuth2 GitHub configuration. # # @param [String] client_id 'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006 - # @param [String] client_secret 'Client Secret' of GitHub OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Github] @@ -1038,6 +1119,7 @@ def update_o_auth2_git_hub(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1054,7 +1136,7 @@ def update_o_auth2_git_hub(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Gitlab configuration. # # @param [String] application_id 'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252 - # @param [String] secret 'Secret' of Gitlab OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret 'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38 # @param [String] endpoint Endpoint URL of self-hosted GitLab instance. For example: https://gitlab.com # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -1070,6 +1152,7 @@ def update_o_auth2_gitlab(application_id: nil, secret: nil, endpoint: nil, enabl } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1086,7 +1169,7 @@ def update_o_auth2_gitlab(application_id: nil, secret: nil, endpoint: nil, enabl # Update the project OAuth2 Google configuration. # # @param [String] client_id 'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com - # @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj # @param [Array] prompt Array of Google OAuth2 prompt values. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. Must not be specified with other values. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account. # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -1102,6 +1185,7 @@ def update_o_auth2_google(client_id: nil, client_secret: nil, prompt: nil, enabl } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1118,7 +1202,7 @@ def update_o_auth2_google(client_id: nil, client_secret: nil, prompt: nil, enabl # Update the project OAuth2 Keycloak configuration. # # @param [String] client_id 'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app - # @param [String] client_secret 'Client Secret' of Keycloak OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO # @param [String] endpoint Domain of Keycloak instance. For example: keycloak.example.com # @param [String] realm_name Keycloak realm name. For example: appwrite-realm # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. @@ -1136,6 +1220,7 @@ def update_o_auth2_keycloak(client_id: nil, client_secret: nil, endpoint: nil, r } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1152,7 +1237,7 @@ def update_o_auth2_keycloak(client_id: nil, client_secret: nil, endpoint: nil, r # Update the project OAuth2 Kick configuration. # # @param [String] client_id 'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32 - # @param [String] client_secret 'Client Secret' of Kick OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Kick] @@ -1166,6 +1251,7 @@ def update_o_auth2_kick(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1182,7 +1268,7 @@ def update_o_auth2_kick(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Linkedin configuration. # # @param [String] client_id 'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv - # @param [String] primary_client_secret 'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: your-oauth2-client-secret + # @param [String] primary_client_secret 'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000./HtlYw== # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Linkedin] @@ -1196,6 +1282,7 @@ def update_o_auth2_linkedin(client_id: nil, primary_client_secret: nil, enabled: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1212,7 +1299,7 @@ def update_o_auth2_linkedin(client_id: nil, primary_client_secret: nil, enabled: # Update the project OAuth2 Microsoft configuration. # # @param [String] application_id 'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444 - # @param [String] application_secret 'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: your-oauth2-client-secret + # @param [String] application_secret 'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u # @param [String] tenant Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # @@ -1228,6 +1315,7 @@ def update_o_auth2_microsoft(application_id: nil, application_secret: nil, tenan } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1244,7 +1332,7 @@ def update_o_auth2_microsoft(application_id: nil, application_secret: nil, tenan # Update the project OAuth2 Notion configuration. # # @param [String] oauth_client_id 'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3 - # @param [String] oauth_client_secret 'OAuth Client Secret' of Notion OAuth2 app. For example: your-oauth2-client-secret + # @param [String] oauth_client_secret 'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Notion] @@ -1258,6 +1346,7 @@ def update_o_auth2_notion(oauth_client_id: nil, oauth_client_secret: nil, enable } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1274,7 +1363,7 @@ def update_o_auth2_notion(oauth_client_id: nil, oauth_client_secret: nil, enable # Update the project OAuth2 Oidc configuration. # # @param [String] client_id 'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG - # @param [String] client_secret 'Client Secret' of Oidc OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV # @param [String] well_known_url OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https://myoauth.com/.well-known/openid-configuration # @param [String] authorization_url OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize # @param [String] token_url OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token @@ -1296,6 +1385,7 @@ def update_o_auth2_oidc(client_id: nil, client_secret: nil, well_known_url: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1312,7 +1402,7 @@ def update_o_auth2_oidc(client_id: nil, client_secret: nil, well_known_url: nil, # Update the project OAuth2 Okta configuration. # # @param [String] client_id 'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698 - # @param [String] client_secret 'Client Secret' of Okta OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV # @param [String] domain Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https://trial-6400025.okta.com/ # @param [String] authorization_server_id Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. @@ -1330,6 +1420,7 @@ def update_o_auth2_okta(client_id: nil, client_secret: nil, domain: nil, authori } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1346,7 +1437,7 @@ def update_o_auth2_okta(client_id: nil, client_secret: nil, domain: nil, authori # Update the project OAuth2 Paypal configuration. # # @param [String] client_id 'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB - # @param [String] secret_key 'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret_key 'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Paypal] @@ -1360,6 +1451,7 @@ def update_o_auth2_paypal(client_id: nil, secret_key: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1376,7 +1468,7 @@ def update_o_auth2_paypal(client_id: nil, secret_key: nil, enabled: nil) # Update the project OAuth2 PaypalSandbox configuration. # # @param [String] client_id 'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB - # @param [String] secret_key 'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret_key 'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Paypal] @@ -1390,6 +1482,7 @@ def update_o_auth2_paypal_sandbox(client_id: nil, secret_key: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1406,7 +1499,7 @@ def update_o_auth2_paypal_sandbox(client_id: nil, secret_key: nil, enabled: nil) # Update the project OAuth2 Podio configuration. # # @param [String] client_id 'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app - # @param [String] client_secret 'Client Secret' of Podio OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Podio] @@ -1420,6 +1513,7 @@ def update_o_auth2_podio(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1436,7 +1530,7 @@ def update_o_auth2_podio(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Salesforce configuration. # # @param [String] customer_key 'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq - # @param [String] customer_secret 'Consumer Secret' of Salesforce OAuth2 app. For example: your-oauth2-client-secret + # @param [String] customer_secret 'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Salesforce] @@ -1450,6 +1544,7 @@ def update_o_auth2_salesforce(customer_key: nil, customer_secret: nil, enabled: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1466,7 +1561,7 @@ def update_o_auth2_salesforce(customer_key: nil, customer_secret: nil, enabled: # Update the project OAuth2 Slack configuration. # # @param [String] client_id 'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023 - # @param [String] client_secret 'Client Secret' of Slack OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Slack] @@ -1480,6 +1575,7 @@ def update_o_auth2_slack(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1496,7 +1592,7 @@ def update_o_auth2_slack(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Spotify configuration. # # @param [String] client_id 'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace - # @param [String] client_secret 'Client Secret' of Spotify OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Spotify] @@ -1510,6 +1606,7 @@ def update_o_auth2_spotify(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1526,7 +1623,7 @@ def update_o_auth2_spotify(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Stripe configuration. # # @param [String] client_id 'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR - # @param [String] api_secret_key 'API Secret Key' of Stripe OAuth2 app. For example: your-oauth2-client-secret + # @param [String] api_secret_key 'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Stripe] @@ -1540,6 +1637,7 @@ def update_o_auth2_stripe(client_id: nil, api_secret_key: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1556,7 +1654,7 @@ def update_o_auth2_stripe(client_id: nil, api_secret_key: nil, enabled: nil) # Update the project OAuth2 Tradeshift configuration. # # @param [String] oauth2_client_id 'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app - # @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: your-oauth2-client-secret + # @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Tradeshift] @@ -1570,6 +1668,7 @@ def update_o_auth2_tradeshift(oauth2_client_id: nil, oauth2_client_secret: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1586,7 +1685,7 @@ def update_o_auth2_tradeshift(oauth2_client_id: nil, oauth2_client_secret: nil, # Update the project OAuth2 Tradeshift Sandbox configuration. # # @param [String] oauth2_client_id 'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app - # @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: your-oauth2-client-secret + # @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Tradeshift] @@ -1600,6 +1699,7 @@ def update_o_auth2_tradeshift_sandbox(oauth2_client_id: nil, oauth2_client_secre } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1616,7 +1716,7 @@ def update_o_auth2_tradeshift_sandbox(oauth2_client_id: nil, oauth2_client_secre # Update the project OAuth2 Twitch configuration. # # @param [String] client_id 'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p - # @param [String] client_secret 'Client Secret' of Twitch OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Twitch] @@ -1630,6 +1730,7 @@ def update_o_auth2_twitch(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1646,7 +1747,7 @@ def update_o_auth2_twitch(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 WordPress configuration. # # @param [String] client_id 'Client ID' of WordPress OAuth2 app. For example: 130005 - # @param [String] client_secret 'Client Secret' of WordPress OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2WordPress] @@ -1660,6 +1761,7 @@ def update_o_auth2_word_press(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1676,7 +1778,7 @@ def update_o_auth2_word_press(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 X configuration. # # @param [String] customer_key 'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT - # @param [String] secret_key 'Secret Key' of X OAuth2 app. For example: your-oauth2-client-secret + # @param [String] secret_key 'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2X] @@ -1690,6 +1792,7 @@ def update_o_auth2_x(customer_key: nil, secret_key: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1706,7 +1809,7 @@ def update_o_auth2_x(customer_key: nil, secret_key: nil, enabled: nil) # Update the project OAuth2 Yahoo configuration. # # @param [String] client_id 'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm - # @param [String] client_secret 'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Yahoo] @@ -1720,6 +1823,7 @@ def update_o_auth2_yahoo(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1736,7 +1840,7 @@ def update_o_auth2_yahoo(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Yandex configuration. # # @param [String] client_id 'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c - # @param [String] client_secret 'Client Secret' of Yandex OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63 # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Yandex] @@ -1750,6 +1854,7 @@ def update_o_auth2_yandex(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1766,7 +1871,7 @@ def update_o_auth2_yandex(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Zoho configuration. # # @param [String] client_id 'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B - # @param [String] client_secret 'Client Secret' of Zoho OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Zoho] @@ -1780,6 +1885,7 @@ def update_o_auth2_zoho(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1796,7 +1902,7 @@ def update_o_auth2_zoho(client_id: nil, client_secret: nil, enabled: nil) # Update the project OAuth2 Zoom configuration. # # @param [String] client_id 'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ - # @param [String] client_secret 'Client Secret' of Zoom OAuth2 app. For example: your-oauth2-client-secret + # @param [String] client_secret 'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. # # @return [OAuth2Zoom] @@ -1810,6 +1916,7 @@ def update_o_auth2_zoom(client_id: nil, client_secret: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1841,6 +1948,7 @@ def get_o_auth2_provider(provider_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } response = @client.call( @@ -2074,6 +2182,7 @@ def list_platforms(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -2117,6 +2226,7 @@ def create_android_platform(platform_id:, name:, application_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2160,6 +2270,7 @@ def update_android_platform(platform_id:, name:, application_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2204,6 +2315,7 @@ def create_apple_platform(platform_id:, name:, bundle_identifier:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2247,6 +2359,7 @@ def update_apple_platform(platform_id:, name:, bundle_identifier:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2291,6 +2404,7 @@ def create_linux_platform(platform_id:, name:, package_name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2334,6 +2448,7 @@ def update_linux_platform(platform_id:, name:, package_name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2378,6 +2493,7 @@ def create_web_platform(platform_id:, name:, hostname:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2421,6 +2537,7 @@ def update_web_platform(platform_id:, name:, hostname:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2465,6 +2582,7 @@ def create_windows_platform(platform_id:, name:, package_identifier_name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2508,6 +2626,7 @@ def update_windows_platform(platform_id:, name:, package_identifier_name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2539,6 +2658,7 @@ def get_platform(platform_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } response = @client.call( @@ -2599,6 +2719,7 @@ def delete_platform(platform_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2626,6 +2747,7 @@ def list_policies(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -2656,6 +2778,7 @@ def update_deny_aliased_email_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2687,6 +2810,7 @@ def update_deny_disposable_email_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2718,6 +2842,7 @@ def update_deny_free_email_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2754,6 +2879,7 @@ def update_membership_privacy_policy(user_id: nil, user_email: nil, user_phone: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2786,6 +2912,7 @@ def update_password_dictionary_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2824,6 +2951,7 @@ def update_password_history_policy(total:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2857,6 +2985,7 @@ def update_password_personal_data_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2870,6 +2999,41 @@ def update_password_personal_data_policy(enabled:) end + # Update the password strength requirements for users in the project. + # + # @param [Integer] min Minimum password length. Value must be between 8 and 256. Default is 8. + # @param [] uppercase Whether passwords must include at least one uppercase letter. + # @param [] lowercase Whether passwords must include at least one lowercase letter. + # @param [] number Whether passwords must include at least one number. + # @param [] symbols Whether passwords must include at least one symbol. + # + # @return [PolicyPasswordStrength] + def update_password_strength_policy(min: nil, uppercase: nil, lowercase: nil, number: nil, symbols: nil) + api_path = '/project/policies/password-strength' + + api_params = { + min: min, + uppercase: uppercase, + lowercase: lowercase, + number: number, + symbols: symbols, + } + + api_headers = { + "X-Appwrite-Project": @client.get_config('project'), + "content-type": 'application/json', + } + + @client.call( + method: 'PATCH', + path: api_path, + headers: api_headers, + params: api_params, + response_type: Models::PolicyPasswordStrength + ) + + end + # Updating this policy allows you to control if email alert is sent upon # session creation. When enabled, and user signs into their account, they # will be sent an email notification. There is an exception, the first @@ -2891,6 +3055,7 @@ def update_session_alert_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2922,6 +3087,7 @@ def update_session_duration_policy(duration:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2954,6 +3120,7 @@ def update_session_invalidation_policy(enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2985,6 +3152,7 @@ def update_session_limit_policy(total:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3017,6 +3185,7 @@ def update_user_limit_policy(total:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3033,9 +3202,9 @@ def update_user_limit_policy(total:) # Get a policy by its unique ID. This endpoint returns the current # configuration for the requested project policy. # - # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email. + # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email. # - # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail] + # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail] def get_policy(policy_id:) api_path = '/project/policies/{policyId}' .gsub('{policyId}', policy_id) @@ -3048,6 +3217,7 @@ def get_policy(policy_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } response = @client.call( @@ -3071,6 +3241,11 @@ def get_policy(policy_id:) return Models::PolicyPasswordHistory.from(map: response) end + if response['$id'] == 'password-strength' + + return Models::PolicyPasswordStrength.from(map: response) + end + if response['$id'] == 'password-personal-data' return Models::PolicyPasswordPersonalData.from(map: response) @@ -3149,6 +3324,7 @@ def update_protocol(protocol_id:, enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3186,6 +3362,7 @@ def update_service(service_id:, enabled:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3232,6 +3409,7 @@ def update_smtp(host: nil, port: nil, username: nil, password: nil, sender_email } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3262,6 +3440,7 @@ def create_smtp_test(emails:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3291,6 +3470,7 @@ def list_email_templates(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3335,6 +3515,7 @@ def update_email_template(template_id:, locale: nil, subject: nil, message: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3369,6 +3550,7 @@ def get_email_template(template_id:, locale: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3396,6 +3578,7 @@ def list_variables(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3440,6 +3623,7 @@ def create_variable(variable_id:, key:, value:, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3470,6 +3654,7 @@ def get_variable(variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3505,6 +3690,7 @@ def update_variable(variable_id:, key: nil, value: nil, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3535,6 +3721,7 @@ def delete_variable(variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/proxy.rb b/lib/appwrite/services/proxy.rb index d30a6cc..542e83f 100644 --- a/lib/appwrite/services/proxy.rb +++ b/lib/appwrite/services/proxy.rb @@ -23,6 +23,7 @@ def list_rules(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -55,6 +56,7 @@ def create_api_rule(domain:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -96,6 +98,7 @@ def create_function_rule(domain:, function_id:, branch: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -154,6 +157,7 @@ def create_redirect_rule(domain:, url:, status_code:, resource_id:, resource_typ } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -195,6 +199,7 @@ def create_site_rule(domain:, site_id:, branch: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -225,6 +230,7 @@ def get_rule(rule_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -254,6 +260,7 @@ def delete_rule(rule_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -286,6 +293,7 @@ def update_rule_status(rule_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/sites.rb b/lib/appwrite/services/sites.rb index 11b6b14..8aa0c19 100644 --- a/lib/appwrite/services/sites.rb +++ b/lib/appwrite/services/sites.rb @@ -25,6 +25,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -110,6 +111,7 @@ def create(site_id:, name:, framework:, build_runtime:, enabled: nil, logging: n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -135,6 +137,7 @@ def list_frameworks() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -158,6 +161,7 @@ def list_specifications() } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -187,6 +191,7 @@ def get(site_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -268,6 +273,7 @@ def update(site_id:, name:, framework:, enabled: nil, logging: nil, timeout: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -298,6 +304,7 @@ def delete(site_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -334,6 +341,7 @@ def update_site_deployment(site_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -371,6 +379,7 @@ def list_deployments(site_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -416,6 +425,7 @@ def create_deployment(site_id:, code:, install_command: nil, build_command: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'multipart/form-data', } @@ -461,6 +471,7 @@ def create_duplicate_deployment(site_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -527,6 +538,7 @@ def create_template_deployment(site_id:, repository:, owner:, root_directory:, t } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -573,6 +585,7 @@ def create_vcs_deployment(site_id:, type:, reference:, activate: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -609,6 +622,7 @@ def get_deployment(site_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -644,6 +658,7 @@ def delete_deployment(site_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -683,6 +698,7 @@ def get_deployment_download(site_id:, deployment_id:, type: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -721,6 +737,7 @@ def update_deployment_status(site_id:, deployment_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -756,6 +773,7 @@ def list_logs(site_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -791,6 +809,7 @@ def get_log(site_id:, log_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -826,6 +845,7 @@ def delete_log(site_id:, log_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -859,6 +879,7 @@ def list_variables(site_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -909,6 +930,7 @@ def create_variable(site_id:, variable_id:, key:, value:, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -945,6 +967,7 @@ def get_variable(site_id:, variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -986,6 +1009,7 @@ def update_variable(site_id:, variable_id:, key: nil, value: nil, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1022,6 +1046,7 @@ def delete_variable(site_id:, variable_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/storage.rb b/lib/appwrite/services/storage.rb index 0db59a1..86d95c5 100644 --- a/lib/appwrite/services/storage.rb +++ b/lib/appwrite/services/storage.rb @@ -25,6 +25,7 @@ def list_buckets(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -78,6 +79,7 @@ def create_bucket(bucket_id:, name:, permissions: nil, file_security: nil, enabl } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -109,6 +111,7 @@ def get_bucket(bucket_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -162,6 +165,7 @@ def update_bucket(bucket_id:, name:, permissions: nil, file_security: nil, enabl } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -192,6 +196,7 @@ def delete_bucket(bucket_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -228,6 +233,7 @@ def list_files(bucket_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -288,6 +294,7 @@ def create_file(bucket_id:, file_id:, file:, permissions: nil, on_progress: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'multipart/form-data', } @@ -330,6 +337,7 @@ def get_file(bucket_id:, file_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -370,6 +378,7 @@ def update_file(bucket_id:, file_id:, name: nil, permissions: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -407,6 +416,7 @@ def delete_file(bucket_id:, file_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -446,6 +456,7 @@ def get_file_download(bucket_id:, file_id:, token: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -508,6 +519,7 @@ def get_file_preview(bucket_id:, file_id:, width: nil, height: nil, gravity: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -546,6 +558,7 @@ def get_file_view(bucket_id:, file_id:, token: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/tables_db.rb b/lib/appwrite/services/tables_db.rb index 8b65405..9d035dc 100644 --- a/lib/appwrite/services/tables_db.rb +++ b/lib/appwrite/services/tables_db.rb @@ -25,6 +25,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -63,6 +64,7 @@ def create(database_id:, name:, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -89,6 +91,7 @@ def list_transactions(queries: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -114,6 +117,7 @@ def create_transaction(ttl: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -144,6 +148,7 @@ def get_transaction(transaction_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -177,6 +182,7 @@ def update_transaction(transaction_id:, commit: nil, rollback: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -207,6 +213,7 @@ def delete_transaction(transaction_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -238,6 +245,7 @@ def create_operations(transaction_id:, operations: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -269,6 +277,7 @@ def get(database_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -302,6 +311,7 @@ def update(database_id:, name: nil, enabled: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -333,6 +343,7 @@ def delete(database_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -369,6 +380,7 @@ def list_tables(database_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -423,6 +435,7 @@ def create_table(database_id:, table_id:, name:, permissions: nil, row_security: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -460,6 +473,7 @@ def get_table(database_id:, table_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -505,6 +519,7 @@ def update_table(database_id:, table_id:, name: nil, permissions: nil, row_secur } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -542,6 +557,7 @@ def delete_table(database_id:, table_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -581,6 +597,7 @@ def list_columns(database_id:, table_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -638,6 +655,7 @@ def create_big_int_column(database_id:, table_id:, key:, required:, min: nil, ma } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -700,6 +718,7 @@ def update_big_int_column(database_id:, table_id:, key:, required:, default:, mi } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -753,6 +772,7 @@ def create_boolean_column(database_id:, table_id:, key:, required:, default: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -810,6 +830,7 @@ def update_boolean_column(database_id:, table_id:, key:, required:, default:, ne } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -862,6 +883,7 @@ def create_datetime_column(database_id:, table_id:, key:, required:, default: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -919,6 +941,7 @@ def update_datetime_column(database_id:, table_id:, key:, required:, default:, n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -972,6 +995,7 @@ def create_email_column(database_id:, table_id:, key:, required:, default: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1030,6 +1054,7 @@ def update_email_column(database_id:, table_id:, key:, required:, default:, new_ } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1089,6 +1114,7 @@ def create_enum_column(database_id:, table_id:, key:, elements:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1153,6 +1179,7 @@ def update_enum_column(database_id:, table_id:, key:, elements:, required:, defa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1211,6 +1238,7 @@ def create_float_column(database_id:, table_id:, key:, required:, min: nil, max: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1273,6 +1301,7 @@ def update_float_column(database_id:, table_id:, key:, required:, default:, min: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1331,6 +1360,7 @@ def create_integer_column(database_id:, table_id:, key:, required:, min: nil, ma } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1393,6 +1423,7 @@ def update_integer_column(database_id:, table_id:, key:, required:, default:, mi } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1446,6 +1477,7 @@ def create_ip_column(database_id:, table_id:, key:, required:, default: nil, arr } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1504,6 +1536,7 @@ def update_ip_column(database_id:, table_id:, key:, required:, default:, new_key } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1554,6 +1587,7 @@ def create_line_column(database_id:, table_id:, key:, required:, default: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1607,6 +1641,7 @@ def update_line_column(database_id:, table_id:, key:, required:, default: nil, n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1662,6 +1697,7 @@ def create_longtext_column(database_id:, table_id:, key:, required:, default: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1720,6 +1756,7 @@ def update_longtext_column(database_id:, table_id:, key:, required:, default:, n } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1775,6 +1812,7 @@ def create_mediumtext_column(database_id:, table_id:, key:, required:, default: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1833,6 +1871,7 @@ def update_mediumtext_column(database_id:, table_id:, key:, required:, default:, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1883,6 +1922,7 @@ def create_point_column(database_id:, table_id:, key:, required:, default: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1936,6 +1976,7 @@ def update_point_column(database_id:, table_id:, key:, required:, default: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1986,6 +2027,7 @@ def create_polygon_column(database_id:, table_id:, key:, required:, default: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2039,6 +2081,7 @@ def update_polygon_column(database_id:, table_id:, key:, required:, default: nil } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2097,6 +2140,7 @@ def create_relationship_column(database_id:, table_id:, related_table_id:, type: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2161,6 +2205,7 @@ def create_string_column(database_id:, table_id:, key:, size:, required:, defaul } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2224,6 +2269,7 @@ def update_string_column(database_id:, table_id:, key:, required:, default:, siz } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2279,6 +2325,7 @@ def create_text_column(database_id:, table_id:, key:, required:, default: nil, a } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2337,6 +2384,7 @@ def update_text_column(database_id:, table_id:, key:, required:, default:, new_k } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2390,6 +2438,7 @@ def create_url_column(database_id:, table_id:, key:, required:, default: nil, ar } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2448,6 +2497,7 @@ def update_url_column(database_id:, table_id:, key:, required:, default:, new_ke } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2509,6 +2559,7 @@ def create_varchar_column(database_id:, table_id:, key:, size:, required:, defau } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2569,6 +2620,7 @@ def update_varchar_column(database_id:, table_id:, key:, required:, default:, si } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2611,6 +2663,7 @@ def get_column(database_id:, table_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } response = @client.call( @@ -2707,6 +2760,7 @@ def delete_column(database_id:, table_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2754,6 +2808,7 @@ def update_relationship_column(database_id:, table_id:, key:, on_delete: nil, ne } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2794,6 +2849,7 @@ def list_indexes(database_id:, table_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -2853,6 +2909,7 @@ def create_index(database_id:, table_id:, key:, type:, columns:, orders: nil, le } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2895,6 +2952,7 @@ def get_index(database_id:, table_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -2936,6 +2994,7 @@ def delete_index(database_id:, table_id:, key:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -2980,6 +3039,7 @@ def list_rows(database_id:, table_id:, queries: nil, transaction_id: nil, total: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3034,6 +3094,7 @@ def create_row(database_id:, table_id:, row_id:, data:, permissions: nil, transa } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3081,6 +3142,7 @@ def create_rows(database_id:, table_id:, rows:, transaction_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3129,6 +3191,7 @@ def upsert_rows(database_id:, table_id:, rows:, transaction_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3172,6 +3235,7 @@ def update_rows(database_id:, table_id:, data: nil, queries: nil, transaction_id } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3213,6 +3277,7 @@ def delete_rows(database_id:, table_id:, queries: nil, transaction_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3260,6 +3325,7 @@ def get_row(database_id:, table_id:, row_id:, queries: nil, transaction_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -3310,6 +3376,7 @@ def upsert_row(database_id:, table_id:, row_id:, data: nil, permissions: nil, tr } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3359,6 +3426,7 @@ def update_row(database_id:, table_id:, row_id:, data: nil, permissions: nil, tr } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3403,6 +3471,7 @@ def delete_row(database_id:, table_id:, row_id:, transaction_id: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3456,6 +3525,7 @@ def decrement_row_column(database_id:, table_id:, row_id:, column:, value: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -3510,6 +3580,7 @@ def increment_row_column(database_id:, table_id:, row_id:, column:, value: nil, } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/teams.rb b/lib/appwrite/services/teams.rb index 8cae84c..d721567 100644 --- a/lib/appwrite/services/teams.rb +++ b/lib/appwrite/services/teams.rb @@ -25,6 +25,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -64,6 +65,7 @@ def create(team_id:, name:, roles: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -94,6 +96,7 @@ def get(team_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -129,6 +132,7 @@ def update_name(team_id:, name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -160,6 +164,7 @@ def delete(team_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -197,6 +202,7 @@ def list_memberships(team_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -262,6 +268,7 @@ def create_membership(team_id:, roles:, email: nil, user_id: nil, phone: nil, ur } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -300,6 +307,7 @@ def get_membership(team_id:, membership_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -344,6 +352,7 @@ def update_membership(team_id:, membership_id:, roles:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -382,6 +391,7 @@ def delete_membership(team_id:, membership_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -435,6 +445,7 @@ def update_membership_status(team_id:, membership_id:, user_id:, secret:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -467,6 +478,7 @@ def get_prefs(team_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -504,6 +516,7 @@ def update_prefs(team_id:, prefs:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/tokens.rb b/lib/appwrite/services/tokens.rb index 19aeb1f..973c892 100644 --- a/lib/appwrite/services/tokens.rb +++ b/lib/appwrite/services/tokens.rb @@ -35,6 +35,7 @@ def list(bucket_id:, file_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -73,6 +74,7 @@ def create_file_token(bucket_id:, file_id:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -103,6 +105,7 @@ def get(token_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -135,6 +138,7 @@ def update(token_id:, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -165,6 +169,7 @@ def delete(token_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/usage.rb b/lib/appwrite/services/usage.rb index 9fe26a8..94f86c4 100644 --- a/lib/appwrite/services/usage.rb +++ b/lib/appwrite/services/usage.rb @@ -33,6 +33,7 @@ def list_events(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -70,6 +71,7 @@ def list_gauges(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( diff --git a/lib/appwrite/services/users.rb b/lib/appwrite/services/users.rb index 25fd3e2..0b7437a 100644 --- a/lib/appwrite/services/users.rb +++ b/lib/appwrite/services/users.rb @@ -25,6 +25,7 @@ def list(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -62,6 +63,7 @@ def create(user_id:, email: nil, phone: nil, password: nil, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -109,6 +111,7 @@ def create_argon2_user(user_id:, email:, password:, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -156,6 +159,7 @@ def create_bcrypt_user(user_id:, email:, password:, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -186,6 +190,7 @@ def list_identities(queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -215,6 +220,7 @@ def delete_identity(identity_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -261,6 +267,7 @@ def create_md5_user(user_id:, email:, password:, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -308,6 +315,7 @@ def create_ph_pass_user(user_id:, email:, password:, name: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -385,6 +393,7 @@ def create_scrypt_user(user_id:, email:, password:, password_salt:, password_cpu } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -451,6 +460,7 @@ def create_scrypt_modified_user(user_id:, email:, password:, password_salt:, pas } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -500,6 +510,7 @@ def create_sha_user(user_id:, email:, password:, password_version: nil, name: ni } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -530,6 +541,7 @@ def get(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -564,6 +576,7 @@ def delete(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -599,6 +612,7 @@ def update_email(user_id:, email:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -640,6 +654,7 @@ def update_impersonator(user_id:, impersonator:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -676,6 +691,7 @@ def create_jwt(user_id:, session_id: nil, duration: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -717,6 +733,7 @@ def update_labels(user_id:, labels:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -751,6 +768,7 @@ def list_logs(user_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -786,6 +804,7 @@ def list_memberships(user_id:, queries: nil, search: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -821,6 +840,7 @@ def update_mfa(user_id:, mfa:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -857,6 +877,7 @@ def delete_mfa_authenticator(user_id:, type:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -886,6 +907,7 @@ def list_mfa_factors(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -918,6 +940,7 @@ def get_mfa_recovery_codes(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -950,6 +973,7 @@ def update_mfa_recovery_codes(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -983,6 +1007,7 @@ def create_mfa_recovery_codes(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1019,6 +1044,7 @@ def update_name(user_id:, name:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1055,6 +1081,7 @@ def update_password(user_id:, password:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1091,6 +1118,7 @@ def update_phone(user_id:, number:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1121,6 +1149,7 @@ def get_prefs(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1158,6 +1187,7 @@ def update_prefs(user_id:, prefs:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1190,6 +1220,7 @@ def list_sessions(user_id:, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1224,6 +1255,7 @@ def create_session(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1254,6 +1286,7 @@ def delete_sessions(user_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1289,6 +1322,7 @@ def delete_session(user_id:, session_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1325,6 +1359,7 @@ def update_status(user_id:, status:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1359,6 +1394,7 @@ def list_targets(user_id:, queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1410,6 +1446,7 @@ def create_target(user_id:, target_id:, provider_type:, identifier:, provider_id } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1446,6 +1483,7 @@ def get_target(user_id:, target_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -1487,6 +1525,7 @@ def update_target(user_id:, target_id:, identifier: nil, provider_id: nil, name: } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1523,6 +1562,7 @@ def delete_target(user_id:, target_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1560,6 +1600,7 @@ def create_token(user_id:, length: nil, expire: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1596,6 +1637,7 @@ def update_email_verification(user_id:, email_verification:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -1632,6 +1674,7 @@ def update_phone_verification(user_id:, phone_verification:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } diff --git a/lib/appwrite/services/webhooks.rb b/lib/appwrite/services/webhooks.rb index 7077f42..9994559 100644 --- a/lib/appwrite/services/webhooks.rb +++ b/lib/appwrite/services/webhooks.rb @@ -23,6 +23,7 @@ def list(queries: nil, total: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -81,6 +82,7 @@ def create(webhook_id:, url:, name:, events:, enabled: nil, tls: nil, auth_usern } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -112,6 +114,7 @@ def get(webhook_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), } @client.call( @@ -168,6 +171,7 @@ def update(webhook_id:, name:, url:, events:, enabled: nil, tls: nil, auth_usern } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -199,6 +203,7 @@ def delete(webhook_id:) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', } @@ -232,6 +237,7 @@ def update_secret(webhook_id:, secret: nil) } api_headers = { + "X-Appwrite-Project": @client.get_config('project'), "content-type": 'application/json', }