appwrite 13.1.0 → 15.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: 91db12572d18cd543bed7b608b76b1eb80007acead69427a1a90c13f13daf6f4
4
- data.tar.gz: a33b3f44d258d6b3f22f67e95765199d2c22b1f9a0e1e7ef595088b61fe1a040
3
+ metadata.gz: c7b89a3506ea51e2761fa9de591a2cc73f77f3f87511f0772bb8d1ce0ad3774b
4
+ data.tar.gz: 0f2b41ded1bf8d51fbec7d94535f77ed4f1548106c7ad2eafb30de808463fd0a
5
5
  SHA512:
6
- metadata.gz: 884cc7aa2ed774b780cdd9904e09f5afe2fb942af27ad60c7134cc8ca6a8cf499b0f046149dea0a3eeaa2d57b218a3142a94b502970a5c95a79ae60b799e29b5
7
- data.tar.gz: 6c987d2022ae499fc8e2421ccc349242477d572d4c946994a0c1221dd933f779b84bf36fd9b402ccd448eb2bede9bb5007a861c6bb87cd2f7e71bda3943ac0f9
6
+ metadata.gz: d05d58c55669041fb5d5cda9a0e14c670f6bfdb5d93610b64e08f8dbaae413cbb400b39fa3bcbef26e00c74f2421728707259ee642c55e1e3cf1437231219a8c
7
+ data.tar.gz: 6078fed9e1b861f0da0625660593ab098e7b8c74bb98f672b178853f6fa46f6d3ca35cf57c9487837ea22e463614cbc99b4d31fd3e76caa9a98f41734de7c637
@@ -15,7 +15,7 @@ module Appwrite
15
15
  'x-sdk-name'=> 'Ruby',
16
16
  'x-sdk-platform'=> 'server',
17
17
  'x-sdk-language'=> 'ruby',
18
- 'x-sdk-version'=> '13.1.0',
18
+ 'x-sdk-version'=> '15.0.0',
19
19
  'X-Appwrite-Response-Format' => '1.6.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -103,8 +103,12 @@ module Appwrite
103
103
  #
104
104
  # @return [self]
105
105
  def set_endpoint(endpoint)
106
+ if not endpoint.start_with?('http://') and not endpoint.start_with?('https://')
107
+ raise Appwrite::Exception.new('Invalid endpoint URL: ' + endpoint)
108
+ end
109
+
106
110
  @endpoint = endpoint
107
-
111
+
108
112
  self
109
113
  end
110
114
 
@@ -187,7 +191,7 @@ module Appwrite
187
191
 
188
192
  offset = 0
189
193
  id_param_name = id_param_name.to_sym if id_param_name
190
- if id_param_name&.empty? == false && params[id_param_name] != "unique()"
194
+ if id_param_name&.empty? == false
191
195
  # Make a request to check if a file already exists
192
196
  current = call(
193
197
  method: "GET",
@@ -257,7 +261,7 @@ module Appwrite
257
261
  @http = Net::HTTP.new(uri.host, uri.port) unless defined? @http
258
262
  @http.use_ssl = !@self_signed
259
263
  payload = ''
260
-
264
+
261
265
  headers = @headers.merge(headers)
262
266
 
263
267
  params.compact!
@@ -292,7 +296,7 @@ module Appwrite
292
296
  if response_type == "location"
293
297
  return location
294
298
  end
295
-
299
+
296
300
  # Handle Redirects
297
301
  if (response.class == Net::HTTPRedirection || response.class == Net::HTTPMovedPermanently)
298
302
  uri = URI.parse(uri.scheme + "://" + uri.host + "" + location)
@@ -303,11 +307,11 @@ module Appwrite
303
307
  begin
304
308
  result = JSON.parse(response.body)
305
309
  rescue JSON::ParserError => e
306
- raise Appwrite::Exception.new(response.body, response.code, nil, response)
310
+ raise Appwrite::Exception.new(response.body, response.code, nil, response.body)
307
311
  end
308
312
 
309
313
  if response.code.to_i >= 400
310
- raise Appwrite::Exception.new(result['message'], result['status'], result['type'], result)
314
+ raise Appwrite::Exception.new(result['message'], result['status'], result['type'], response.body)
311
315
  end
312
316
 
313
317
  unless response_type.respond_to?("from")
@@ -318,7 +322,7 @@ module Appwrite
318
322
  end
319
323
 
320
324
  if response.code.to_i >= 400
321
- raise Appwrite::Exception.new(response.body, response.code, response)
325
+ raise Appwrite::Exception.new(response.body, response.code, response, response.body)
322
326
  end
323
327
 
324
328
  if response.respond_to?("body_permitted?")
@@ -327,7 +331,7 @@ module Appwrite
327
331
 
328
332
  return response
329
333
  end
330
-
334
+
331
335
  def encode_form_data(value, key=nil)
332
336
  case value
333
337
  when Hash
@@ -359,13 +363,13 @@ module Appwrite
359
363
  when Hash then value.map { |k,v| encode(v, append_key(key,k)) }.join('&')
360
364
  when Array then value.map { |v| encode(v, "#{key}[]") }.join('&')
361
365
  when nil then ''
362
- else
363
- "#{key}=#{CGI.escape(value.to_s)}"
366
+ else
367
+ "#{key}=#{CGI.escape(value.to_s)}"
364
368
  end
365
369
  end
366
370
 
367
371
  def append_key(root_key, key)
368
372
  root_key.nil? ? key : "#{root_key}[#{key.to_s}]"
369
373
  end
370
- end
374
+ end
371
375
  end
@@ -17,6 +17,7 @@ module Appwrite
17
17
  VISA = 'visa'
18
18
  MIR = 'mir'
19
19
  MAESTRO = 'maestro'
20
+ RUPAY = 'rupay'
20
21
  end
21
22
  end
22
23
  end
@@ -6,6 +6,7 @@ module Appwrite
6
6
  GIF = 'gif'
7
7
  PNG = 'png'
8
8
  WEBP = 'webp'
9
+ HEIC = 'heic'
9
10
  AVIF = 'avif'
10
11
  end
11
12
  end
@@ -6,8 +6,8 @@ module Appwrite
6
6
  V1_AUDITS = 'v1-audits'
7
7
  V1_MAILS = 'v1-mails'
8
8
  V1_FUNCTIONS = 'v1-functions'
9
- V1_USAGE = 'v1-usage'
10
- V1_USAGE_DUMP = 'v1-usage-dump'
9
+ V1_STATS_RESOURCES = 'v1-stats-resources'
10
+ V1_STATS_USAGE = 'v1-stats-usage'
11
11
  V1_WEBHOOKS = 'v1-webhooks'
12
12
  V1_CERTIFICATES = 'v1-certificates'
13
13
  V1_BUILDS = 'v1-builds'
@@ -15,6 +15,7 @@ module Appwrite
15
15
  DROPBOX = 'dropbox'
16
16
  ETSY = 'etsy'
17
17
  FACEBOOK = 'facebook'
18
+ FIGMA = 'figma'
18
19
  GITHUB = 'github'
19
20
  GITLAB = 'gitlab'
20
21
  GOOGLE = 'google'
@@ -18,7 +18,6 @@ module Appwrite
18
18
  }
19
19
 
20
20
  api_headers = {
21
- "content-type": 'application/json',
22
21
  }
23
22
 
24
23
  @client.call(
@@ -137,7 +136,6 @@ module Appwrite
137
136
  }
138
137
 
139
138
  api_headers = {
140
- "content-type": 'application/json',
141
139
  }
142
140
 
143
141
  @client.call(
@@ -221,7 +219,6 @@ module Appwrite
221
219
  }
222
220
 
223
221
  api_headers = {
224
- "content-type": 'application/json',
225
222
  }
226
223
 
227
224
  @client.call(
@@ -405,7 +402,7 @@ module Appwrite
405
402
  # @param [String] challenge_id ID of the challenge.
406
403
  # @param [String] otp Valid verification token.
407
404
  #
408
- # @return []
405
+ # @return [Session]
409
406
  def update_mfa_challenge(challenge_id:, otp:)
410
407
  api_path = '/account/mfa/challenge'
411
408
 
@@ -431,6 +428,7 @@ module Appwrite
431
428
  path: api_path,
432
429
  headers: api_headers,
433
430
  params: api_params,
431
+ response_type: Models::Session
434
432
  )
435
433
  end
436
434
 
@@ -446,7 +444,6 @@ module Appwrite
446
444
  }
447
445
 
448
446
  api_headers = {
449
- "content-type": 'application/json',
450
447
  }
451
448
 
452
449
  @client.call(
@@ -473,7 +470,6 @@ module Appwrite
473
470
  }
474
471
 
475
472
  api_headers = {
476
- "content-type": 'application/json',
477
473
  }
478
474
 
479
475
  @client.call(
@@ -656,7 +652,6 @@ module Appwrite
656
652
  }
657
653
 
658
654
  api_headers = {
659
- "content-type": 'application/json',
660
655
  }
661
656
 
662
657
  @client.call(
@@ -807,7 +802,6 @@ module Appwrite
807
802
  }
808
803
 
809
804
  api_headers = {
810
- "content-type": 'application/json',
811
805
  }
812
806
 
813
807
  @client.call(
@@ -1047,7 +1041,6 @@ module Appwrite
1047
1041
  }
1048
1042
 
1049
1043
  api_headers = {
1050
- "content-type": 'application/json',
1051
1044
  }
1052
1045
 
1053
1046
  @client.call(
@@ -1266,7 +1259,7 @@ module Appwrite
1266
1259
  # about session
1267
1260
  # limits](https://appwrite.io/docs/authentication-security#limits).
1268
1261
  #
1269
- # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
1262
+ # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
1270
1263
  # @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.
1271
1264
  # @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.
1272
1265
  # @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.
@@ -1287,7 +1280,6 @@ module Appwrite
1287
1280
  }
1288
1281
 
1289
1282
  api_headers = {
1290
- "content-type": 'application/json',
1291
1283
  }
1292
1284
 
1293
1285
  @client.call(
@@ -39,7 +39,6 @@ module Appwrite
39
39
  }
40
40
 
41
41
  api_headers = {
42
- "content-type": 'application/json',
43
42
  }
44
43
 
45
44
  @client.call(
@@ -61,7 +60,7 @@ module Appwrite
61
60
  # of image returned is 100x100px.
62
61
  #
63
62
  #
64
- # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.
63
+ # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.
65
64
  # @param [Integer] width Image width. Pass an integer between 0 to 2000. Defaults to 100.
66
65
  # @param [Integer] height Image height. Pass an integer between 0 to 2000. Defaults to 100.
67
66
  # @param [Integer] quality Image quality. Pass an integer between 0 to 100. Defaults to 100.
@@ -82,7 +81,6 @@ module Appwrite
82
81
  }
83
82
 
84
83
  api_headers = {
85
- "content-type": 'application/json',
86
84
  }
87
85
 
88
86
  @client.call(
@@ -114,7 +112,6 @@ module Appwrite
114
112
  }
115
113
 
116
114
  api_headers = {
117
- "content-type": 'application/json',
118
115
  }
119
116
 
120
117
  @client.call(
@@ -158,7 +155,6 @@ module Appwrite
158
155
  }
159
156
 
160
157
  api_headers = {
161
- "content-type": 'application/json',
162
158
  }
163
159
 
164
160
  @client.call(
@@ -201,7 +197,6 @@ module Appwrite
201
197
  }
202
198
 
203
199
  api_headers = {
204
- "content-type": 'application/json',
205
200
  }
206
201
 
207
202
  @client.call(
@@ -247,7 +242,6 @@ module Appwrite
247
242
  }
248
243
 
249
244
  api_headers = {
250
- "content-type": 'application/json',
251
245
  }
252
246
 
253
247
  @client.call(
@@ -284,7 +278,6 @@ module Appwrite
284
278
  }
285
279
 
286
280
  api_headers = {
287
- "content-type": 'application/json',
288
281
  }
289
282
 
290
283
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -93,7 +92,6 @@ module Appwrite
93
92
  }
94
93
 
95
94
  api_headers = {
96
- "content-type": 'application/json',
97
95
  }
98
96
 
99
97
  @client.call(
@@ -196,7 +194,6 @@ module Appwrite
196
194
  }
197
195
 
198
196
  api_headers = {
199
- "content-type": 'application/json',
200
197
  }
201
198
 
202
199
  @client.call(
@@ -284,7 +281,6 @@ module Appwrite
284
281
  }
285
282
 
286
283
  api_headers = {
287
- "content-type": 'application/json',
288
284
  }
289
285
 
290
286
  @client.call(
@@ -406,7 +402,6 @@ module Appwrite
406
402
  }
407
403
 
408
404
  api_headers = {
409
- "content-type": 'application/json',
410
405
  }
411
406
 
412
407
  @client.call(
@@ -939,13 +934,13 @@ module Appwrite
939
934
  # @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).
940
935
  # @param [String] key Attribute Key.
941
936
  # @param [] required Is attribute required?
937
+ # @param [Float] default Default value for attribute when not provided. Cannot be set when attribute is required.
942
938
  # @param [Float] min Minimum value to enforce on new documents
943
939
  # @param [Float] max Maximum value to enforce on new documents
944
- # @param [Float] default Default value for attribute when not provided. Cannot be set when attribute is required.
945
940
  # @param [String] new_key New attribute key.
946
941
  #
947
942
  # @return [AttributeFloat]
948
- def update_float_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:, new_key: nil)
943
+ def update_float_attribute(database_id:, collection_id:, key:, required:, default:, min: nil, max: nil, new_key: nil)
949
944
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'
950
945
  .gsub('{databaseId}', database_id)
951
946
  .gsub('{collectionId}', collection_id)
@@ -967,14 +962,6 @@ module Appwrite
967
962
  raise Appwrite::Exception.new('Missing required parameter: "required"')
968
963
  end
969
964
 
970
- if min.nil?
971
- raise Appwrite::Exception.new('Missing required parameter: "min"')
972
- end
973
-
974
- if max.nil?
975
- raise Appwrite::Exception.new('Missing required parameter: "max"')
976
- end
977
-
978
965
  if default.nil?
979
966
  raise Appwrite::Exception.new('Missing required parameter: "default"')
980
967
  end
@@ -1067,13 +1054,13 @@ module Appwrite
1067
1054
  # @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).
1068
1055
  # @param [String] key Attribute Key.
1069
1056
  # @param [] required Is attribute required?
1057
+ # @param [Integer] default Default value for attribute when not provided. Cannot be set when attribute is required.
1070
1058
  # @param [Integer] min Minimum value to enforce on new documents
1071
1059
  # @param [Integer] max Maximum value to enforce on new documents
1072
- # @param [Integer] default Default value for attribute when not provided. Cannot be set when attribute is required.
1073
1060
  # @param [String] new_key New attribute key.
1074
1061
  #
1075
1062
  # @return [AttributeInteger]
1076
- def update_integer_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:, new_key: nil)
1063
+ def update_integer_attribute(database_id:, collection_id:, key:, required:, default:, min: nil, max: nil, new_key: nil)
1077
1064
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'
1078
1065
  .gsub('{databaseId}', database_id)
1079
1066
  .gsub('{collectionId}', collection_id)
@@ -1095,14 +1082,6 @@ module Appwrite
1095
1082
  raise Appwrite::Exception.new('Missing required parameter: "required"')
1096
1083
  end
1097
1084
 
1098
- if min.nil?
1099
- raise Appwrite::Exception.new('Missing required parameter: "min"')
1100
- end
1101
-
1102
- if max.nil?
1103
- raise Appwrite::Exception.new('Missing required parameter: "max"')
1104
- end
1105
-
1106
1085
  if default.nil?
1107
1086
  raise Appwrite::Exception.new('Missing required parameter: "default"')
1108
1087
  end
@@ -1559,7 +1538,6 @@ module Appwrite
1559
1538
  }
1560
1539
 
1561
1540
  api_headers = {
1562
- "content-type": 'application/json',
1563
1541
  }
1564
1542
 
1565
1543
  @client.call(
@@ -1686,7 +1664,6 @@ module Appwrite
1686
1664
  }
1687
1665
 
1688
1666
  api_headers = {
1689
- "content-type": 'application/json',
1690
1667
  }
1691
1668
 
1692
1669
  @client.call(
@@ -1703,6 +1680,7 @@ module Appwrite
1703
1680
  # collection resource using either a [server
1704
1681
  # integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
1705
1682
  # API or directly from your database console.
1683
+ #
1706
1684
  #
1707
1685
  # @param [String] database_id Database ID.
1708
1686
  # @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.
@@ -1784,7 +1762,6 @@ module Appwrite
1784
1762
  }
1785
1763
 
1786
1764
  api_headers = {
1787
- "content-type": 'application/json',
1788
1765
  }
1789
1766
 
1790
1767
  @client.call(
@@ -1910,7 +1887,6 @@ module Appwrite
1910
1887
  }
1911
1888
 
1912
1889
  api_headers = {
1913
- "content-type": 'application/json',
1914
1890
  }
1915
1891
 
1916
1892
  @client.call(
@@ -2010,7 +1986,6 @@ module Appwrite
2010
1986
  }
2011
1987
 
2012
1988
  api_headers = {
2013
- "content-type": 'application/json',
2014
1989
  }
2015
1990
 
2016
1991
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -130,7 +129,6 @@ module Appwrite
130
129
  }
131
130
 
132
131
  api_headers = {
133
- "content-type": 'application/json',
134
132
  }
135
133
 
136
134
  @client.call(
@@ -155,7 +153,6 @@ module Appwrite
155
153
  }
156
154
 
157
155
  api_headers = {
158
- "content-type": 'application/json',
159
156
  }
160
157
 
161
158
  @client.call(
@@ -185,7 +182,6 @@ module Appwrite
185
182
  }
186
183
 
187
184
  api_headers = {
188
- "content-type": 'application/json',
189
185
  }
190
186
 
191
187
  @client.call(
@@ -317,7 +313,6 @@ module Appwrite
317
313
  }
318
314
 
319
315
  api_headers = {
320
- "content-type": 'application/json',
321
316
  }
322
317
 
323
318
  @client.call(
@@ -413,7 +408,6 @@ module Appwrite
413
408
  }
414
409
 
415
410
  api_headers = {
416
- "content-type": 'application/json',
417
411
  }
418
412
 
419
413
  @client.call(
@@ -499,7 +493,11 @@ module Appwrite
499
493
  end
500
494
 
501
495
 
502
- #
496
+ # Create a new build for an existing function deployment. This endpoint
497
+ # allows you to rebuild a deployment with the updated function configuration,
498
+ # including its entrypoint and build commands if they have been modified The
499
+ # build process will be queued and executed asynchronously. The original
500
+ # deployment's code will be preserved and used for the new build.
503
501
  #
504
502
  # @param [String] function_id Function ID.
505
503
  # @param [String] deployment_id Deployment ID.
@@ -536,7 +534,11 @@ module Appwrite
536
534
  end
537
535
 
538
536
 
539
- #
537
+ # Cancel an ongoing function deployment build. If the build is already in
538
+ # progress, it will be stopped and marked as canceled. If the build hasn't
539
+ # started yet, it will be marked as canceled without executing. You cannot
540
+ # cancel builds that have already completed (status 'ready') or failed. The
541
+ # response includes the final build status and details.
540
542
  #
541
543
  # @param [String] function_id Function ID.
542
544
  # @param [String] deployment_id Deployment ID.
@@ -596,7 +598,6 @@ module Appwrite
596
598
  }
597
599
 
598
600
  api_headers = {
599
- "content-type": 'application/json',
600
601
  }
601
602
 
602
603
  @client.call(
@@ -630,7 +631,6 @@ module Appwrite
630
631
  }
631
632
 
632
633
  api_headers = {
633
- "content-type": 'application/json',
634
634
  }
635
635
 
636
636
  @client.call(
@@ -711,7 +711,6 @@ module Appwrite
711
711
  }
712
712
 
713
713
  api_headers = {
714
- "content-type": 'application/json',
715
714
  }
716
715
 
717
716
  @client.call(
@@ -777,7 +776,6 @@ module Appwrite
777
776
  }
778
777
 
779
778
  api_headers = {
780
- "content-type": 'application/json',
781
779
  }
782
780
 
783
781
  @client.call(
@@ -856,7 +854,6 @@ module Appwrite
856
854
  }
857
855
 
858
856
  api_headers = {
859
- "content-type": 'application/json',
860
857
  }
861
858
 
862
859
  @client.call(
@@ -18,7 +18,6 @@ module Appwrite
18
18
  }
19
19
 
20
20
  api_headers = {
21
- "content-type": 'application/json',
22
21
  }
23
22
 
24
23
  @client.call(
@@ -42,7 +41,6 @@ module Appwrite
42
41
  }
43
42
 
44
43
  api_headers = {
45
- "content-type": 'application/json',
46
44
  }
47
45
 
48
46
  @client.call(
@@ -67,7 +65,6 @@ module Appwrite
67
65
  }
68
66
 
69
67
  api_headers = {
70
- "content-type": 'application/json',
71
68
  }
72
69
 
73
70
  @client.call(
@@ -93,7 +90,6 @@ module Appwrite
93
90
  }
94
91
 
95
92
  api_headers = {
96
- "content-type": 'application/json',
97
93
  }
98
94
 
99
95
  @client.call(
@@ -117,7 +113,6 @@ module Appwrite
117
113
  }
118
114
 
119
115
  api_headers = {
120
- "content-type": 'application/json',
121
116
  }
122
117
 
123
118
  @client.call(
@@ -141,32 +136,6 @@ module Appwrite
141
136
  }
142
137
 
143
138
  api_headers = {
144
- "content-type": 'application/json',
145
- }
146
-
147
- @client.call(
148
- method: 'GET',
149
- path: api_path,
150
- headers: api_headers,
151
- params: api_params,
152
- response_type: Models::HealthStatus
153
- )
154
- end
155
-
156
-
157
- # Check the Appwrite queue messaging servers are up and connection is
158
- # successful.
159
- #
160
- #
161
- # @return [HealthStatus]
162
- def get_queue()
163
- api_path = '/health/queue'
164
-
165
- api_params = {
166
- }
167
-
168
- api_headers = {
169
- "content-type": 'application/json',
170
139
  }
171
140
 
172
141
  @client.call(
@@ -193,7 +162,6 @@ module Appwrite
193
162
  }
194
163
 
195
164
  api_headers = {
196
- "content-type": 'application/json',
197
165
  }
198
166
 
199
167
  @client.call(
@@ -221,7 +189,6 @@ module Appwrite
221
189
  }
222
190
 
223
191
  api_headers = {
224
- "content-type": 'application/json',
225
192
  }
226
193
 
227
194
  @client.call(
@@ -250,7 +217,6 @@ module Appwrite
250
217
  }
251
218
 
252
219
  api_headers = {
253
- "content-type": 'application/json',
254
220
  }
255
221
 
256
222
  @client.call(
@@ -277,7 +243,6 @@ module Appwrite
277
243
  }
278
244
 
279
245
  api_headers = {
280
- "content-type": 'application/json',
281
246
  }
282
247
 
283
248
  @client.call(
@@ -310,7 +275,6 @@ module Appwrite
310
275
  }
311
276
 
312
277
  api_headers = {
313
- "content-type": 'application/json',
314
278
  }
315
279
 
316
280
  @client.call(
@@ -337,7 +301,6 @@ module Appwrite
337
301
  }
338
302
 
339
303
  api_headers = {
340
- "content-type": 'application/json',
341
304
  }
342
305
 
343
306
  @client.call(
@@ -364,7 +327,6 @@ module Appwrite
364
327
  }
365
328
 
366
329
  api_headers = {
367
- "content-type": 'application/json',
368
330
  }
369
331
 
370
332
  @client.call(
@@ -391,7 +353,6 @@ module Appwrite
391
353
  }
392
354
 
393
355
  api_headers = {
394
- "content-type": 'application/json',
395
356
  }
396
357
 
397
358
  @client.call(
@@ -418,7 +379,6 @@ module Appwrite
418
379
  }
419
380
 
420
381
  api_headers = {
421
- "content-type": 'application/json',
422
382
  }
423
383
 
424
384
  @client.call(
@@ -445,7 +405,6 @@ module Appwrite
445
405
  }
446
406
 
447
407
  api_headers = {
448
- "content-type": 'application/json',
449
408
  }
450
409
 
451
410
  @client.call(
@@ -459,20 +418,19 @@ module Appwrite
459
418
 
460
419
 
461
420
  # Get the number of metrics that are waiting to be processed in the Appwrite
462
- # internal queue server.
421
+ # stats resources queue.
463
422
  #
464
423
  # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
465
424
  #
466
425
  # @return [HealthQueue]
467
- def get_queue_usage(threshold: nil)
468
- api_path = '/health/queue/usage'
426
+ def get_queue_stats_resources(threshold: nil)
427
+ api_path = '/health/queue/stats-resources'
469
428
 
470
429
  api_params = {
471
430
  threshold: threshold,
472
431
  }
473
432
 
474
433
  api_headers = {
475
- "content-type": 'application/json',
476
434
  }
477
435
 
478
436
  @client.call(
@@ -485,21 +443,20 @@ module Appwrite
485
443
  end
486
444
 
487
445
 
488
- # Get the number of projects containing metrics that are waiting to be
489
- # processed in the Appwrite internal queue server.
446
+ # Get the number of metrics that are waiting to be processed in the Appwrite
447
+ # internal queue server.
490
448
  #
491
449
  # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
492
450
  #
493
451
  # @return [HealthQueue]
494
- def get_queue_usage_dump(threshold: nil)
495
- api_path = '/health/queue/usage-dump'
452
+ def get_queue_usage(threshold: nil)
453
+ api_path = '/health/queue/stats-usage'
496
454
 
497
455
  api_params = {
498
456
  threshold: threshold,
499
457
  }
500
458
 
501
459
  api_headers = {
502
- "content-type": 'application/json',
503
460
  }
504
461
 
505
462
  @client.call(
@@ -526,7 +483,6 @@ module Appwrite
526
483
  }
527
484
 
528
485
  api_headers = {
529
- "content-type": 'application/json',
530
486
  }
531
487
 
532
488
  @client.call(
@@ -550,7 +506,6 @@ module Appwrite
550
506
  }
551
507
 
552
508
  api_headers = {
553
- "content-type": 'application/json',
554
509
  }
555
510
 
556
511
  @client.call(
@@ -574,7 +529,6 @@ module Appwrite
574
529
  }
575
530
 
576
531
  api_headers = {
577
- "content-type": 'application/json',
578
532
  }
579
533
 
580
534
  @client.call(
@@ -604,7 +558,6 @@ module Appwrite
604
558
  }
605
559
 
606
560
  api_headers = {
607
- "content-type": 'application/json',
608
561
  }
609
562
 
610
563
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -48,7 +47,6 @@ module Appwrite
48
47
  }
49
48
 
50
49
  api_headers = {
51
- "content-type": 'application/json',
52
50
  }
53
51
 
54
52
  @client.call(
@@ -73,7 +71,6 @@ module Appwrite
73
71
  }
74
72
 
75
73
  api_headers = {
76
- "content-type": 'application/json',
77
74
  }
78
75
 
79
76
  @client.call(
@@ -98,7 +95,6 @@ module Appwrite
98
95
  }
99
96
 
100
97
  api_headers = {
101
- "content-type": 'application/json',
102
98
  }
103
99
 
104
100
  @client.call(
@@ -123,7 +119,6 @@ module Appwrite
123
119
  }
124
120
 
125
121
  api_headers = {
126
- "content-type": 'application/json',
127
122
  }
128
123
 
129
124
  @client.call(
@@ -148,7 +143,6 @@ module Appwrite
148
143
  }
149
144
 
150
145
  api_headers = {
151
- "content-type": 'application/json',
152
146
  }
153
147
 
154
148
  @client.call(
@@ -174,7 +168,6 @@ module Appwrite
174
168
  }
175
169
 
176
170
  api_headers = {
177
- "content-type": 'application/json',
178
171
  }
179
172
 
180
173
  @client.call(
@@ -199,7 +192,6 @@ module Appwrite
199
192
  }
200
193
 
201
194
  api_headers = {
202
- "content-type": 'application/json',
203
195
  }
204
196
 
205
197
  @client.call(
@@ -22,7 +22,6 @@ module Appwrite
22
22
  }
23
23
 
24
24
  api_headers = {
25
- "content-type": 'application/json',
26
25
  }
27
26
 
28
27
  @client.call(
@@ -95,7 +94,9 @@ module Appwrite
95
94
  end
96
95
 
97
96
 
98
- # Update an email message by its unique ID.
97
+ # Update an email message by its unique ID. This endpoint only works on
98
+ # messages that are in draft status. Messages that are already processing,
99
+ # sent, or failed cannot be updated.
99
100
  #
100
101
  #
101
102
  # @param [String] message_id Message ID.
@@ -214,7 +215,9 @@ module Appwrite
214
215
  end
215
216
 
216
217
 
217
- # Update a push notification by its unique ID.
218
+ # Update a push notification by its unique ID. This endpoint only works on
219
+ # messages that are in draft status. Messages that are already processing,
220
+ # sent, or failed cannot be updated.
218
221
  #
219
222
  #
220
223
  # @param [String] message_id Message ID.
@@ -327,7 +330,9 @@ module Appwrite
327
330
  end
328
331
 
329
332
 
330
- # Update an email message by its unique ID.
333
+ # Update an SMS message by its unique ID. This endpoint only works on
334
+ # messages that are in draft status. Messages that are already processing,
335
+ # sent, or failed cannot be updated.
331
336
  #
332
337
  #
333
338
  # @param [String] message_id Message ID.
@@ -388,7 +393,6 @@ module Appwrite
388
393
  }
389
394
 
390
395
  api_headers = {
391
- "content-type": 'application/json',
392
396
  }
393
397
 
394
398
  @client.call(
@@ -450,7 +454,6 @@ module Appwrite
450
454
  }
451
455
 
452
456
  api_headers = {
453
- "content-type": 'application/json',
454
457
  }
455
458
 
456
459
  @client.call(
@@ -482,7 +485,6 @@ module Appwrite
482
485
  }
483
486
 
484
487
  api_headers = {
485
- "content-type": 'application/json',
486
488
  }
487
489
 
488
490
  @client.call(
@@ -510,7 +512,6 @@ module Appwrite
510
512
  }
511
513
 
512
514
  api_headers = {
513
- "content-type": 'application/json',
514
515
  }
515
516
 
516
517
  @client.call(
@@ -1441,7 +1442,6 @@ module Appwrite
1441
1442
  }
1442
1443
 
1443
1444
  api_headers = {
1444
- "content-type": 'application/json',
1445
1445
  }
1446
1446
 
1447
1447
  @client.call(
@@ -1502,7 +1502,6 @@ module Appwrite
1502
1502
  }
1503
1503
 
1504
1504
  api_headers = {
1505
- "content-type": 'application/json',
1506
1505
  }
1507
1506
 
1508
1507
  @client.call(
@@ -1534,7 +1533,6 @@ module Appwrite
1534
1533
  }
1535
1534
 
1536
1535
  api_headers = {
1537
- "content-type": 'application/json',
1538
1536
  }
1539
1537
 
1540
1538
  @client.call(
@@ -1562,7 +1560,6 @@ module Appwrite
1562
1560
  }
1563
1561
 
1564
1562
  api_headers = {
1565
- "content-type": 'application/json',
1566
1563
  }
1567
1564
 
1568
1565
  @client.call(
@@ -1631,7 +1628,6 @@ module Appwrite
1631
1628
  }
1632
1629
 
1633
1630
  api_headers = {
1634
- "content-type": 'application/json',
1635
1631
  }
1636
1632
 
1637
1633
  @client.call(
@@ -1727,7 +1723,6 @@ module Appwrite
1727
1723
  }
1728
1724
 
1729
1725
  api_headers = {
1730
- "content-type": 'application/json',
1731
1726
  }
1732
1727
 
1733
1728
  @client.call(
@@ -1761,7 +1756,6 @@ module Appwrite
1761
1756
  }
1762
1757
 
1763
1758
  api_headers = {
1764
- "content-type": 'application/json',
1765
1759
  }
1766
1760
 
1767
1761
  @client.call(
@@ -1840,7 +1834,6 @@ module Appwrite
1840
1834
  }
1841
1835
 
1842
1836
  api_headers = {
1843
- "content-type": 'application/json',
1844
1837
  }
1845
1838
 
1846
1839
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -106,7 +105,6 @@ module Appwrite
106
105
  }
107
106
 
108
107
  api_headers = {
109
- "content-type": 'application/json',
110
108
  }
111
109
 
112
110
  @client.call(
@@ -222,7 +220,6 @@ module Appwrite
222
220
  }
223
221
 
224
222
  api_headers = {
225
- "content-type": 'application/json',
226
223
  }
227
224
 
228
225
  @client.call(
@@ -325,7 +322,6 @@ module Appwrite
325
322
  }
326
323
 
327
324
  api_headers = {
328
- "content-type": 'application/json',
329
325
  }
330
326
 
331
327
  @client.call(
@@ -440,7 +436,6 @@ module Appwrite
440
436
  }
441
437
 
442
438
  api_headers = {
443
- "content-type": 'application/json',
444
439
  }
445
440
 
446
441
  @client.call(
@@ -501,7 +496,6 @@ module Appwrite
501
496
  }
502
497
 
503
498
  api_headers = {
504
- "content-type": 'application/json',
505
499
  }
506
500
 
507
501
  @client.call(
@@ -538,7 +532,6 @@ module Appwrite
538
532
  }
539
533
 
540
534
  api_headers = {
541
- "content-type": 'application/json',
542
535
  }
543
536
 
544
537
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -93,7 +92,6 @@ module Appwrite
93
92
  }
94
93
 
95
94
  api_headers = {
96
- "content-type": 'application/json',
97
95
  }
98
96
 
99
97
  @client.call(
@@ -195,7 +193,6 @@ module Appwrite
195
193
  }
196
194
 
197
195
  api_headers = {
198
- "content-type": 'application/json',
199
196
  }
200
197
 
201
198
  @client.call(
@@ -299,7 +296,6 @@ module Appwrite
299
296
  }
300
297
 
301
298
  api_headers = {
302
- "content-type": 'application/json',
303
299
  }
304
300
 
305
301
  @client.call(
@@ -467,7 +463,6 @@ module Appwrite
467
463
  }
468
464
 
469
465
  api_headers = {
470
- "content-type": 'application/json',
471
466
  }
472
467
 
473
468
  @client.call(
@@ -23,7 +23,6 @@ module Appwrite
23
23
  }
24
24
 
25
25
  api_headers = {
26
- "content-type": 'application/json',
27
26
  }
28
27
 
29
28
  @client.call(
@@ -183,7 +182,6 @@ module Appwrite
183
182
  }
184
183
 
185
184
  api_headers = {
186
- "content-type": 'application/json',
187
185
  }
188
186
 
189
187
  @client.call(
@@ -528,7 +526,6 @@ module Appwrite
528
526
  }
529
527
 
530
528
  api_headers = {
531
- "content-type": 'application/json',
532
529
  }
533
530
 
534
531
  @client.call(
@@ -707,7 +704,6 @@ module Appwrite
707
704
  }
708
705
 
709
706
  api_headers = {
710
- "content-type": 'application/json',
711
707
  }
712
708
 
713
709
  @client.call(
@@ -737,7 +733,6 @@ module Appwrite
737
733
  }
738
734
 
739
735
  api_headers = {
740
- "content-type": 'application/json',
741
736
  }
742
737
 
743
738
  @client.call(
@@ -791,7 +786,7 @@ module Appwrite
791
786
  # @param [String] user_id User ID.
792
787
  # @param [AuthenticatorType] type Type of authenticator.
793
788
  #
794
- # @return [User]
789
+ # @return []
795
790
  def delete_mfa_authenticator(user_id:, type:)
796
791
  api_path = '/users/{userId}/mfa/authenticators/{type}'
797
792
  .gsub('{userId}', user_id)
@@ -817,7 +812,6 @@ module Appwrite
817
812
  path: api_path,
818
813
  headers: api_headers,
819
814
  params: api_params,
820
- response_type: Models::User
821
815
  )
822
816
  end
823
817
 
@@ -839,7 +833,6 @@ module Appwrite
839
833
  }
840
834
 
841
835
  api_headers = {
842
- "content-type": 'application/json',
843
836
  }
844
837
 
845
838
  @client.call(
@@ -872,7 +865,6 @@ module Appwrite
872
865
  }
873
866
 
874
867
  api_headers = {
875
- "content-type": 'application/json',
876
868
  }
877
869
 
878
870
  @client.call(
@@ -1076,7 +1068,6 @@ module Appwrite
1076
1068
  }
1077
1069
 
1078
1070
  api_headers = {
1079
- "content-type": 'application/json',
1080
1071
  }
1081
1072
 
1082
1073
  @client.call(
@@ -1144,7 +1135,6 @@ module Appwrite
1144
1135
  }
1145
1136
 
1146
1137
  api_headers = {
1147
- "content-type": 'application/json',
1148
1138
  }
1149
1139
 
1150
1140
  @client.call(
@@ -1312,7 +1302,6 @@ module Appwrite
1312
1302
  }
1313
1303
 
1314
1304
  api_headers = {
1315
- "content-type": 'application/json',
1316
1305
  }
1317
1306
 
1318
1307
  @client.call(
@@ -1400,7 +1389,6 @@ module Appwrite
1400
1389
  }
1401
1390
 
1402
1391
  api_headers = {
1403
- "content-type": 'application/json',
1404
1392
  }
1405
1393
 
1406
1394
  @client.call(
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: 13.1.0
4
+ version: 15.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: 2025-01-22 00:00:00.000000000 Z
11
+ date: 2025-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types