appwrite 28.0.0.rc1 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7072bf1d6d016463c2d2c9c306c434495ee1e5ca178b7153469d3f5d32e5c884
4
- data.tar.gz: 990f6a0b07adb04dea2c50f7be9b90bdd349cba52aa60fbc85f2c4c01adcad95
3
+ metadata.gz: 2c5de74f095233acf1cd8317ad282f928d9ca134c29d0e2ddfe241e9998bbefd
4
+ data.tar.gz: 94b18ecba1c83bec4a7c4d942a653d5cc8561f2da0e4dd77240f310ab7e87c5d
5
5
  SHA512:
6
- metadata.gz: 510eb227e2ab48861d416d161e195bedd945dec472b7e9e07d5312eb021c61c19284534c8e79fb0a82d14ae6b8d9e29f2798bcefa1e8808f7a6a7741c20fb513
7
- data.tar.gz: 611ae3f8651aaeaef21190fda33df7533932bd7ac94de5b4a0fe05054b98cb3c9869952dd70568eb4341bfa2377f943946953551f9567bee0e26970d6d797e97
6
+ metadata.gz: 9d7d5f9397eef3ff115e28f8ad64188eebfdbb9ad0ba0854702349469ea98912893bc75dc0e9f587ec30cc9bcf1d343d7d309dc1a7cf4326786b49501bab5ca5
7
+ data.tar.gz: a6e014b5914c0916014344e1317cd04387fb3a06bff2aacb9a5889db5e4615931b43f32965ccf10262919830a5a0b9ed55c067bad59b68698ebf008d3202ffe3
@@ -14,8 +14,8 @@ module Appwrite
14
14
  'x-sdk-name' => 'Ruby',
15
15
  'x-sdk-platform' => 'server',
16
16
  'x-sdk-language' => 'ruby',
17
- 'x-sdk-version' => '28.0.0.rc1',
18
- 'X-Appwrite-Response-Format' => '1.9.6'
17
+ 'x-sdk-version' => '28.0.0',
18
+ 'X-Appwrite-Response-Format' => '2.0.0'
19
19
  }
20
20
  @endpoint = 'https://cloud.appwrite.io/v1'
21
21
  @config = {}
@@ -10,6 +10,7 @@ module Appwrite
10
10
  BITBUCKET = 'bitbucket'
11
11
  BITLY = 'bitly'
12
12
  BOX = 'box'
13
+ CLOUDFLARE = 'cloudflare'
13
14
  DAILYMOTION = 'dailymotion'
14
15
  DISCORD = 'discord'
15
16
  DISQUS = 'disqus'
@@ -32,6 +33,7 @@ module Appwrite
32
33
  PAYPAL = 'paypal'
33
34
  PAYPALSANDBOX = 'paypalSandbox'
34
35
  PODIO = 'podio'
36
+ RESEND = 'resend'
35
37
  SALESFORCE = 'salesforce'
36
38
  SLACK = 'slack'
37
39
  SPOTIFY = 'spotify'
@@ -49,12 +49,16 @@ module Appwrite
49
49
  DOCUMENTSDB_COLLECTIONS_WRITE = 'documentsdb.collections.write'
50
50
  DOCUMENTSDB_DOCUMENTS_READ = 'documentsdb.documents.read'
51
51
  DOCUMENTSDB_DOCUMENTS_WRITE = 'documentsdb.documents.write'
52
+ DOCUMENTSDB_INDEXES_READ = 'documentsdb.indexes.read'
53
+ DOCUMENTSDB_INDEXES_WRITE = 'documentsdb.indexes.write'
52
54
  VECTORSDB_READ = 'vectorsdb.read'
53
55
  VECTORSDB_WRITE = 'vectorsdb.write'
54
56
  VECTORSDB_COLLECTIONS_READ = 'vectorsdb.collections.read'
55
57
  VECTORSDB_COLLECTIONS_WRITE = 'vectorsdb.collections.write'
56
58
  VECTORSDB_DOCUMENTS_READ = 'vectorsdb.documents.read'
57
59
  VECTORSDB_DOCUMENTS_WRITE = 'vectorsdb.documents.write'
60
+ VECTORSDB_INDEXES_READ = 'vectorsdb.indexes.read'
61
+ VECTORSDB_INDEXES_WRITE = 'vectorsdb.indexes.write'
58
62
  BUCKETS_READ = 'buckets.read'
59
63
  BUCKETS_WRITE = 'buckets.write'
60
64
  FILES_READ = 'files.read'
@@ -10,6 +10,7 @@ module Appwrite
10
10
  BITBUCKET = 'bitbucket'
11
11
  BITLY = 'bitly'
12
12
  BOX = 'box'
13
+ CLOUDFLARE = 'cloudflare'
13
14
  DAILYMOTION = 'dailymotion'
14
15
  DISCORD = 'discord'
15
16
  DISQUS = 'disqus'
@@ -32,6 +33,7 @@ module Appwrite
32
33
  PAYPAL = 'paypal'
33
34
  PAYPALSANDBOX = 'paypalSandbox'
34
35
  PODIO = 'podio'
36
+ RESEND = 'resend'
35
37
  SALESFORCE = 'salesforce'
36
38
  SLACK = 'slack'
37
39
  SPOTIFY = 'spotify'
@@ -40,6 +40,7 @@ module Appwrite
40
40
  attr_reader :activity_logs
41
41
  attr_reader :usage_logs
42
42
  attr_reader :usage_logs_intervals
43
+ attr_reader :usage_aggregate_only_metrics
43
44
  attr_reader :project_inactivity_days
44
45
  attr_reader :alert_limit
45
46
  attr_reader :usage
@@ -113,6 +114,7 @@ module Appwrite
113
114
  activity_logs:,
114
115
  usage_logs:,
115
116
  usage_logs_intervals:,
117
+ usage_aggregate_only_metrics:,
116
118
  project_inactivity_days:,
117
119
  alert_limit:,
118
120
  usage:,
@@ -185,6 +187,7 @@ module Appwrite
185
187
  @activity_logs = activity_logs
186
188
  @usage_logs = usage_logs
187
189
  @usage_logs_intervals = usage_logs_intervals
190
+ @usage_aggregate_only_metrics = usage_aggregate_only_metrics
188
191
  @project_inactivity_days = project_inactivity_days
189
192
  @alert_limit = alert_limit
190
193
  @usage = usage
@@ -260,6 +263,7 @@ module Appwrite
260
263
  activity_logs: map["activityLogs"],
261
264
  usage_logs: map["usageLogs"],
262
265
  usage_logs_intervals: map["usageLogsIntervals"],
266
+ usage_aggregate_only_metrics: map["usageAggregateOnlyMetrics"],
263
267
  project_inactivity_days: map["projectInactivityDays"],
264
268
  alert_limit: map["alertLimit"],
265
269
  usage: UsageBillingPlan.from(map: map["usage"]),
@@ -336,6 +340,7 @@ module Appwrite
336
340
  "activityLogs": @activity_logs,
337
341
  "usageLogs": @usage_logs,
338
342
  "usageLogsIntervals": @usage_logs_intervals,
343
+ "usageAggregateOnlyMetrics": @usage_aggregate_only_metrics,
339
344
  "projectInactivityDays": @project_inactivity_days,
340
345
  "alertLimit": @alert_limit,
341
346
  "usage": @usage.to_map,
@@ -17,6 +17,7 @@ module Appwrite
17
17
  attr_reader :connection_port
18
18
  attr_reader :connection_user
19
19
  attr_reader :connection_password
20
+ attr_reader :credential_generation
20
21
  attr_reader :connection_string
21
22
  attr_reader :ssl
22
23
  attr_reader :status
@@ -67,6 +68,7 @@ module Appwrite
67
68
  connection_port:,
68
69
  connection_user:,
69
70
  connection_password:,
71
+ credential_generation:,
70
72
  connection_string:,
71
73
  ssl:,
72
74
  status:,
@@ -116,6 +118,7 @@ module Appwrite
116
118
  @connection_port = connection_port
117
119
  @connection_user = connection_user
118
120
  @connection_password = connection_password
121
+ @credential_generation = credential_generation
119
122
  @connection_string = connection_string
120
123
  @ssl = ssl
121
124
  @status = status
@@ -168,6 +171,7 @@ module Appwrite
168
171
  connection_port: map["connectionPort"],
169
172
  connection_user: map["connectionUser"],
170
173
  connection_password: map["connectionPassword"],
174
+ credential_generation: map["credentialGeneration"],
171
175
  connection_string: map["connectionString"],
172
176
  ssl: map["ssl"],
173
177
  status: map["status"],
@@ -221,6 +225,7 @@ module Appwrite
221
225
  "connectionPort": @connection_port,
222
226
  "connectionUser": @connection_user,
223
227
  "connectionPassword": @connection_password,
228
+ "credentialGeneration": @credential_generation,
224
229
  "connectionString": @connection_string,
225
230
  "ssl": @ssl,
226
231
  "status": @status,
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Cloudflare
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Cloudflare.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Resend
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Resend.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -1550,7 +1550,7 @@ module Appwrite
1550
1550
  # about session
1551
1551
  # limits](https://appwrite.io/docs/authentication-security#limits).
1552
1552
  #
1553
- # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1553
+ # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1554
1554
  # @param [String] success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1555
1555
  # @param [String] failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1556
1556
  # @param [Array] scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -289,22 +289,25 @@ module Appwrite
289
289
  # OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in
290
290
  # static fallback.
291
291
  #
292
- # The photo resolves for the currently authenticated user unless `userId`
293
- # points at another user. Passing `emailHash` and/or `name` resolves the
294
- # avatar from those values alone: the hash is looked up on Gravatar and
295
- # Libravatar, the name is rendered as initials, and the user's own identity
296
- # photos, email, and name leave the chain so they never shadow the avatar
297
- # being asked for. Emails are only ever accepted pre-hashed, so no address
298
- # ends up in a URL.
292
+ # Passing `userId` `current()` for the authenticated user resolves
293
+ # the photo from everything known about that user: identity photos, email,
294
+ # and name. An explicit `emailHash` or `name` then overrides just that value,
295
+ # and the user's remaining sources stay in the chain. Without `userId`,
296
+ # passing `emailHash` and/or `name` resolves the avatar from those values
297
+ # alone: the hash is looked up on Gravatar and Libravatar, the name is
298
+ # rendered as initials, and the session user stays out of the chain so their
299
+ # own photo never shadows the avatar being asked for. When nothing is passed,
300
+ # the photo resolves for the currently authenticated user. Emails are only
301
+ # ever accepted pre-hashed, so no address ends up in a URL.
299
302
  #
300
303
  # @param [Integer] width Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256.
301
304
  # @param [Integer] height Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256.
302
305
  # @param [Integer] quality Output image quality between 0 and 100. Defaults to 100.
303
306
  # @param [String] output Output image format. Defaults to 'png'.
304
307
  # @param [String] rating Maximum image rating to fetch from Gravatar/Libravatar. Defaults to 'g'.
305
- # @param [String] user_id User ID to resolve the photo for. Defaults to 'current()' for the currently authenticated user.
306
- # @param [String] email_hash SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own photo sources. Pass the hash, never the address itself.
307
- # @param [String] name Name to render initials from instead of the user's own photo sources. Max length: 128 chars.
308
+ # @param [String] user_id User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed.
309
+ # @param [String] email_hash SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself.
310
+ # @param [String] name Name to render initials from instead of the user's own name. Max length: 128 chars.
308
311
  #
309
312
  # @return []
310
313
  def get_photo(
@@ -729,6 +729,7 @@ module Appwrite
729
729
  # @param [String] document_id Document 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.
730
730
  # @param [Hash] data Document data as JSON object.
731
731
  # @param [Array] permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
732
+ # @param [String] transaction_id Transaction ID for staging the operation.
732
733
  #
733
734
  # @return [Document]
734
735
  def create_document(
@@ -736,7 +737,8 @@ module Appwrite
736
737
  collection_id:,
737
738
  document_id:,
738
739
  data:,
739
- permissions: nil
740
+ permissions: nil,
741
+ transaction_id: nil
740
742
  )
741
743
  api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
742
744
  .gsub('{databaseId}', database_id)
@@ -762,6 +764,7 @@ module Appwrite
762
764
  documentId: document_id,
763
765
  data: data,
764
766
  permissions: permissions,
767
+ transactionId: transaction_id,
765
768
  }
766
769
 
767
770
  api_headers = {
@@ -787,12 +790,14 @@ module Appwrite
787
790
  # @param [String] database_id Database ID.
788
791
  # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
789
792
  # @param [Array] documents Array of documents data as JSON objects.
793
+ # @param [String] transaction_id Transaction ID for staging the operation.
790
794
  #
791
795
  # @return [DocumentList]
792
796
  def create_documents(
793
797
  database_id:,
794
798
  collection_id:,
795
- documents:
799
+ documents:,
800
+ transaction_id: nil
796
801
  )
797
802
  api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
798
803
  .gsub('{databaseId}', database_id)
@@ -812,6 +817,7 @@ module Appwrite
812
817
 
813
818
  api_params = {
814
819
  documents: documents,
820
+ transactionId: transaction_id,
815
821
  }
816
822
 
817
823
  api_headers = {
@@ -868,14 +868,14 @@ module Appwrite
868
868
  )
869
869
  end
870
870
 
871
- # Rotate the primary connection credentials for a dedicated database.
872
- # Generates a new password and updates the database atomically. Previous
873
- # credentials stop working immediately. Returns the database with a refreshed
874
- # connection string carrying the new password.
871
+ # Queue a rotation of the primary connection credentials for a dedicated
872
+ # database. A hibernated database is woken by the worker before rotation.
873
+ # List database operations until the returned operation reaches a terminal
874
+ # status, then fetch the database again for the refreshed connection string.
875
875
  #
876
876
  # @param [String] database_id Database ID.
877
877
  #
878
- # @return [DedicatedDatabase]
878
+ # @return [DedicatedDatabaseOperation]
879
879
  def update_credentials(
880
880
  database_id:
881
881
  )
@@ -899,7 +899,7 @@ module Appwrite
899
899
  path: api_path,
900
900
  headers: api_headers,
901
901
  params: api_params,
902
- response_type: Models::DedicatedDatabase
902
+ response_type: Models::DedicatedDatabaseOperation
903
903
  )
904
904
  end
905
905
 
@@ -868,14 +868,14 @@ module Appwrite
868
868
  )
869
869
  end
870
870
 
871
- # Rotate the primary connection credentials for a dedicated database.
872
- # Generates a new password and updates the database atomically. Previous
873
- # credentials stop working immediately. Returns the database with a refreshed
874
- # connection string carrying the new password.
871
+ # Queue a rotation of the primary connection credentials for a dedicated
872
+ # database. A hibernated database is woken by the worker before rotation.
873
+ # List database operations until the returned operation reaches a terminal
874
+ # status, then fetch the database again for the refreshed connection string.
875
875
  #
876
876
  # @param [String] database_id Database ID.
877
877
  #
878
- # @return [DedicatedDatabase]
878
+ # @return [DedicatedDatabaseOperation]
879
879
  def update_credentials(
880
880
  database_id:
881
881
  )
@@ -899,7 +899,7 @@ module Appwrite
899
899
  path: api_path,
900
900
  headers: api_headers,
901
901
  params: api_params,
902
- response_type: Models::DedicatedDatabase
902
+ response_type: Models::DedicatedDatabaseOperation
903
903
  )
904
904
  end
905
905
 
@@ -868,14 +868,14 @@ module Appwrite
868
868
  )
869
869
  end
870
870
 
871
- # Rotate the primary connection credentials for a dedicated database.
872
- # Generates a new password and updates the database atomically. Previous
873
- # credentials stop working immediately. Returns the database with a refreshed
874
- # connection string carrying the new password.
871
+ # Queue a rotation of the primary connection credentials for a dedicated
872
+ # database. A hibernated database is woken by the worker before rotation.
873
+ # List database operations until the returned operation reaches a terminal
874
+ # status, then fetch the database again for the refreshed connection string.
875
875
  #
876
876
  # @param [String] database_id Database ID.
877
877
  #
878
- # @return [DedicatedDatabase]
878
+ # @return [DedicatedDatabaseOperation]
879
879
  def update_credentials(
880
880
  database_id:
881
881
  )
@@ -899,7 +899,7 @@ module Appwrite
899
899
  path: api_path,
900
900
  headers: api_headers,
901
901
  params: api_params,
902
- response_type: Models::DedicatedDatabase
902
+ response_type: Models::DedicatedDatabaseOperation
903
903
  )
904
904
  end
905
905
 
@@ -932,6 +932,41 @@ module Appwrite
932
932
  )
933
933
  end
934
934
 
935
+ # Update the project OAuth2 Cloudflare configuration.
936
+ #
937
+ # @param [String] client_id 'Client ID' of Cloudflare OAuth2 app. For example: 4b866000000000000000000000c9e4e2
938
+ # @param [String] client_secret 'Client Secret' of Cloudflare OAuth2 app. For example: cfoc_5Q6YRl0000000000000000000000000000000000003d214f
939
+ # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
940
+ #
941
+ # @return [OAuth2Cloudflare]
942
+ def update_o_auth2_cloudflare(
943
+ client_id: nil,
944
+ client_secret: nil,
945
+ enabled: nil
946
+ )
947
+ api_path = '/project/oauth2/cloudflare'
948
+
949
+ api_params = {
950
+ clientId: client_id,
951
+ clientSecret: client_secret,
952
+ enabled: enabled,
953
+ }
954
+
955
+ api_headers = {
956
+ "X-Appwrite-Project": @client.get_config('project'),
957
+ "content-type": 'application/json',
958
+ "accept": 'application/json',
959
+ }
960
+
961
+ @client.call(
962
+ method: 'PATCH',
963
+ path: api_path,
964
+ headers: api_headers,
965
+ params: api_params,
966
+ response_type: Models::OAuth2Cloudflare
967
+ )
968
+ end
969
+
935
970
  # Update the project OAuth2 Dailymotion configuration.
936
971
  #
937
972
  # @param [String] api_key 'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f
@@ -1744,6 +1779,41 @@ module Appwrite
1744
1779
  )
1745
1780
  end
1746
1781
 
1782
+ # Update the project OAuth2 Resend configuration.
1783
+ #
1784
+ # @param [String] client_id 'Client ID' of Resend OAuth2 app. For example: f47ac10b-58cc-4372-a567-0e02b2c3d479
1785
+ # @param [String] client_secret 'Client Secret' of Resend OAuth2 app. For example: 9c1e4b00000000000000000000000000000000000000000000000000a72d5f4
1786
+ # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
1787
+ #
1788
+ # @return [OAuth2Resend]
1789
+ def update_o_auth2_resend(
1790
+ client_id: nil,
1791
+ client_secret: nil,
1792
+ enabled: nil
1793
+ )
1794
+ api_path = '/project/oauth2/resend'
1795
+
1796
+ api_params = {
1797
+ clientId: client_id,
1798
+ clientSecret: client_secret,
1799
+ enabled: enabled,
1800
+ }
1801
+
1802
+ api_headers = {
1803
+ "X-Appwrite-Project": @client.get_config('project'),
1804
+ "content-type": 'application/json',
1805
+ "accept": 'application/json',
1806
+ }
1807
+
1808
+ @client.call(
1809
+ method: 'PATCH',
1810
+ path: api_path,
1811
+ headers: api_headers,
1812
+ params: api_params,
1813
+ response_type: Models::OAuth2Resend
1814
+ )
1815
+ end
1816
+
1747
1817
  # Update the project OAuth2 Salesforce configuration.
1748
1818
  #
1749
1819
  # @param [String] customer_key 'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq
@@ -2204,7 +2274,7 @@ module Appwrite
2204
2274
  #
2205
2275
  # @param [ProjectOAuthProviderId] provider_id OAuth2 provider key. For example: github, google, apple.
2206
2276
  #
2207
- # @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft]
2277
+ # @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft]
2208
2278
  def get_o_auth2_provider(
2209
2279
  provider_id:
2210
2280
  )
@@ -2353,6 +2423,16 @@ module Appwrite
2353
2423
  return Models::OAuth2HuggingFace.from(map: response)
2354
2424
  end
2355
2425
 
2426
+ if response['$id'] == 'resend'
2427
+
2428
+ return Models::OAuth2Resend.from(map: response)
2429
+ end
2430
+
2431
+ if response['$id'] == 'cloudflare'
2432
+
2433
+ return Models::OAuth2Cloudflare.from(map: response)
2434
+ end
2435
+
2356
2436
  if response['$id'] == 'linkedin'
2357
2437
 
2358
2438
  return Models::OAuth2Linkedin.from(map: response)
@@ -632,11 +632,11 @@ module Appwrite
632
632
  # @param [String] migration_id Migration ID.
633
633
  #
634
634
  # @return [DatabaseMigration]
635
- def cutover_migration(
635
+ def create_cutover(
636
636
  database_id:,
637
637
  migration_id:
638
638
  )
639
- api_path = '/tablesdb/{databaseId}/migrations/{migrationId}/cutover'
639
+ api_path = '/tablesdb/{databaseId}/migrations/{migrationId}/cutovers'
640
640
  .gsub('{databaseId}', database_id)
641
641
  .gsub('{migrationId}', migration_id)
642
642
 
@@ -730,6 +730,7 @@ module Appwrite
730
730
  # @param [String] document_id Document 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.
731
731
  # @param [Hash] data Document data as JSON object.
732
732
  # @param [Array] permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
733
+ # @param [String] transaction_id Transaction ID for staging the operation.
733
734
  #
734
735
  # @return [Document]
735
736
  def create_document(
@@ -737,7 +738,8 @@ module Appwrite
737
738
  collection_id:,
738
739
  document_id:,
739
740
  data:,
740
- permissions: nil
741
+ permissions: nil,
742
+ transaction_id: nil
741
743
  )
742
744
  api_path = '/vectorsdb/{databaseId}/collections/{collectionId}/documents'
743
745
  .gsub('{databaseId}', database_id)
@@ -763,6 +765,7 @@ module Appwrite
763
765
  documentId: document_id,
764
766
  data: data,
765
767
  permissions: permissions,
768
+ transactionId: transaction_id,
766
769
  }
767
770
 
768
771
  api_headers = {
@@ -788,12 +791,14 @@ module Appwrite
788
791
  # @param [String] database_id Database ID.
789
792
  # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
790
793
  # @param [Array] documents Array of documents data as JSON objects.
794
+ # @param [String] transaction_id Transaction ID for staging the operation.
791
795
  #
792
796
  # @return [DocumentList]
793
797
  def create_documents(
794
798
  database_id:,
795
799
  collection_id:,
796
- documents:
800
+ documents:,
801
+ transaction_id: nil
797
802
  )
798
803
  api_path = '/vectorsdb/{databaseId}/collections/{collectionId}/documents'
799
804
  .gsub('{databaseId}', database_id)
@@ -813,6 +818,7 @@ module Appwrite
813
818
 
814
819
  api_params = {
815
820
  documents: documents,
821
+ transactionId: transaction_id,
816
822
  }
817
823
 
818
824
  api_headers = {
data/lib/appwrite.rb CHANGED
@@ -171,6 +171,7 @@ require_relative 'appwrite/models/o_auth2_podio'
171
171
  require_relative 'appwrite/models/o_auth2_notion'
172
172
  require_relative 'appwrite/models/o_auth2_salesforce'
173
173
  require_relative 'appwrite/models/o_auth2_yahoo'
174
+ require_relative 'appwrite/models/o_auth2_cloudflare'
174
175
  require_relative 'appwrite/models/o_auth2_hugging_face'
175
176
  require_relative 'appwrite/models/o_auth2_linkedin'
176
177
  require_relative 'appwrite/models/o_auth2_disqus'
@@ -190,6 +191,7 @@ require_relative 'appwrite/models/o_auth2_okta'
190
191
  require_relative 'appwrite/models/o_auth2_kick'
191
192
  require_relative 'appwrite/models/o_auth2_apple'
192
193
  require_relative 'appwrite/models/o_auth2_microsoft'
194
+ require_relative 'appwrite/models/o_auth2_resend'
193
195
  require_relative 'appwrite/models/o_auth2_provider_list'
194
196
  require_relative 'appwrite/models/policy_password_dictionary'
195
197
  require_relative 'appwrite/models/policy_password_history'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 28.0.0.rc1
4
+ version: 28.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-28 00:00:00.000000000 Z
11
+ date: 2026-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -273,6 +273,7 @@ files:
273
273
  - lib/appwrite/models/o_auth2_bitbucket.rb
274
274
  - lib/appwrite/models/o_auth2_bitly.rb
275
275
  - lib/appwrite/models/o_auth2_box.rb
276
+ - lib/appwrite/models/o_auth2_cloudflare.rb
276
277
  - lib/appwrite/models/o_auth2_dailymotion.rb
277
278
  - lib/appwrite/models/o_auth2_discord.rb
278
279
  - lib/appwrite/models/o_auth2_disqus.rb
@@ -295,6 +296,7 @@ files:
295
296
  - lib/appwrite/models/o_auth2_paypal.rb
296
297
  - lib/appwrite/models/o_auth2_podio.rb
297
298
  - lib/appwrite/models/o_auth2_provider_list.rb
299
+ - lib/appwrite/models/o_auth2_resend.rb
298
300
  - lib/appwrite/models/o_auth2_salesforce.rb
299
301
  - lib/appwrite/models/o_auth2_slack.rb
300
302
  - lib/appwrite/models/o_auth2_spotify.rb
@@ -447,9 +449,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
447
449
  version: '0'
448
450
  required_rubygems_version: !ruby/object:Gem::Requirement
449
451
  requirements:
450
- - - ">"
452
+ - - ">="
451
453
  - !ruby/object:Gem::Version
452
- version: 1.3.1
454
+ version: '0'
453
455
  requirements: []
454
456
  rubygems_version: 3.1.6
455
457
  signing_key: