appwrite 9.0.1 → 10.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18592d674132d41fd96084e13cd69f58286ed43bfde4be1bc74401e72b3a3c94
4
- data.tar.gz: 370cb83347b54e2fb9008e7bd64a2d63e4318943e2688c54898da05416b0be96
3
+ metadata.gz: 478b70da37fa544d40390cd7482bef9bc8fe6e0f5d9dc99971c02f88302c9d15
4
+ data.tar.gz: eea1fb5c32cc713be7202bfa65bf22d329c8e134061af8dcc14f61cc1c9623ae
5
5
  SHA512:
6
- metadata.gz: ad64a8dd43d47dd5a161e19ac7dd46c318f0d68102e81e9afe5e8602969b22b5cf18162eb9affc8f6bc18488f653aade7e546b0a901c3e2420d4279dbb70a072
7
- data.tar.gz: dad348a020f49a082a50096966c447dfb618689fa4ac87d014d275d9415f71fb0047d24ec765f6f7b7672adaa6d268d050326857bf8700812023b446412a412e
6
+ metadata.gz: bf497dc875e2a31de3411cc597a8bc9f35309db413987056a896fe18b34e985fe3b27326c1d50e326553c205029ab055a53440065b89f78dd8a4c3d775e47c9f
7
+ data.tar.gz: 91db17dff775a367edf2123813c82dec700db8587bd665c79343a39c3dbca2f2471a971182cbd59cdebc069ed47fd5959da4646990fc606ea4546c856c64be71
@@ -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'=> '9.0.1',
18
+ 'x-sdk-version'=> '10.1.0',
19
19
  'X-Appwrite-Response-Format' => '1.4.0'
20
20
  }
21
21
  @endpoint = 'https://HOSTNAME/v1'
@@ -34,7 +34,7 @@ module Appwrite
34
34
  end
35
35
 
36
36
  def between(attribute, start, ending)
37
- return add_query(attribute, "between", [start, ending])
37
+ return "between(\"#{attribute}\", #{parse_values(start)}, #{parse_values(ending)})"
38
38
  end
39
39
 
40
40
  def starts_with(attribute, value)
@@ -81,13 +81,13 @@ module Appwrite
81
81
 
82
82
  def add_query(attribute, method, value)
83
83
  if value.is_a?(Array)
84
- "#{method}(\"#{attribute}\", [#{value.map {|item| parseValues(item)}.join(',')}])"
84
+ "#{method}(\"#{attribute}\", [#{value.map {|item| parse_values(item)}.join(',')}])"
85
85
  else
86
- return "#{method}(\"#{attribute}\", [#{parseValues(value)}])"
86
+ return "#{method}(\"#{attribute}\", [#{parse_values(value)}])"
87
87
  end
88
88
  end
89
89
 
90
- def parseValues(value)
90
+ def parse_values(value)
91
91
  return value.is_a?(String) ? "\"#{value}\"" : value
92
92
  end
93
93
  end
@@ -223,7 +223,7 @@ module Appwrite
223
223
  # Update the currently logged in user's phone number. After updating the
224
224
  # phone number, the phone verification status will be reset. A confirmation
225
225
  # SMS is not sent automatically, however you can use the [POST
226
- # /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
226
+ # /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)
227
227
  # endpoint to send a confirmation SMS.
228
228
  #
229
229
  # @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -321,9 +321,9 @@ module Appwrite
321
321
  # app password reset URL with the secret key and email address values
322
322
  # attached to the URL query string. Use the query string params to submit a
323
323
  # request to the [PUT
324
- # /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to
325
- # complete the process. The verification link sent to the user's email
326
- # address is valid for 1 hour.
324
+ # /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery)
325
+ # endpoint to complete the process. The verification link sent to the user's
326
+ # email address is valid for 1 hour.
327
327
  #
328
328
  # @param [String] email User email.
329
329
  # @param [String] url URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project 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.
@@ -362,7 +362,8 @@ module Appwrite
362
362
  # Use this endpoint to complete the user account password reset. Both the
363
363
  # **userId** and **secret** arguments will be passed as query parameters to
364
364
  # the redirect URL you have provided when sending your request to the [POST
365
- # /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.
365
+ # /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery)
366
+ # endpoint.
366
367
  #
367
368
  # Please note that in order to avoid a [Redirect
368
369
  # Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
@@ -530,7 +531,8 @@ module Appwrite
530
531
  # Logout the user. Use 'current' as the session ID to logout on this device,
531
532
  # use a session ID to logout on another device. If you're looking to logout
532
533
  # the user on all devices, use [Delete
533
- # Sessions](/docs/client/account#accountDeleteSessions) instead.
534
+ # Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions)
535
+ # instead.
534
536
  #
535
537
  # @param [String] session_id Session ID. Use the string 'current' to delete the current device session.
536
538
  #
@@ -592,8 +594,8 @@ module Appwrite
592
594
  # should redirect the user back to your app and allow you to complete the
593
595
  # verification process by verifying both the **userId** and **secret**
594
596
  # parameters. Learn more about how to [complete the verification
595
- # process](/docs/client/account#accountUpdateEmailVerification). The
596
- # verification link sent to the user's email address is valid for 7 days.
597
+ # process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
598
+ # The verification link sent to the user's email address is valid for 7 days.
597
599
  #
598
600
  # Please note that in order to avoid a [Redirect
599
601
  # Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
@@ -670,10 +672,12 @@ module Appwrite
670
672
 
671
673
  # Use this endpoint to send a verification SMS to the currently logged in
672
674
  # user. This endpoint is meant for use after updating a user's phone number
673
- # using the [accountUpdatePhone](/docs/client/account#accountUpdatePhone)
675
+ # using the
676
+ # [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone)
674
677
  # endpoint. Learn more about how to [complete the verification
675
- # process](/docs/client/account#accountUpdatePhoneVerification). The
676
- # verification code sent to the user's phone number is valid for 15 minutes.
678
+ # process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification).
679
+ # The verification code sent to the user's phone number is valid for 15
680
+ # minutes.
677
681
  #
678
682
  #
679
683
  # @return [Token]
@@ -9,8 +9,9 @@ module Appwrite
9
9
 
10
10
  # You can use this endpoint to show different browser icons to your users.
11
11
  # The code argument receives the browser code as it appears in your user [GET
12
- # /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use
13
- # width, height and quality arguments to change the output settings.
12
+ # /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions)
13
+ # endpoint. Use width, height and quality arguments to change the output
14
+ # settings.
14
15
  #
15
16
  # When one dimension is specified and the other is 0, the image is scaled
16
17
  # with preserved aspect ratio. If both dimensions are 0, the API provides an
@@ -127,7 +128,7 @@ module Appwrite
127
128
  # You can use this endpoint to show different country flags icons to your
128
129
  # users. The code argument receives the 2 letter country code. Use width,
129
130
  # height and quality arguments to change the output settings. Country codes
130
- # follow the [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) standard.
131
+ # follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
131
132
  #
132
133
  # When one dimension is specified and the other is 0, the image is scaled
133
134
  # with preserved aspect ratio. If both dimensions are 0, the API provides an
@@ -211,14 +211,14 @@ module Appwrite
211
211
 
212
212
  # Create a new Collection. Before using this route, you should create a new
213
213
  # database resource using either a [server
214
- # integration](/docs/server/databases#databasesCreateCollection) API or
215
- # directly from your database console.
214
+ # integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
215
+ # API or directly from your database console.
216
216
  #
217
217
  # @param [String] database_id Database ID.
218
218
  # @param [String] collection_id Unique 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.
219
219
  # @param [String] name Collection name. Max length: 128 chars.
220
- # @param [Array] permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).
221
- # @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).
220
+ # @param [Array] permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
221
+ # @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
222
222
  # @param [] enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
223
223
  #
224
224
  # @return [Collection]
@@ -302,8 +302,8 @@ module Appwrite
302
302
  # @param [String] database_id Database ID.
303
303
  # @param [String] collection_id Collection ID.
304
304
  # @param [String] name Collection name. Max length: 128 chars.
305
- # @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
306
- # @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).
305
+ # @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
306
+ # @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
307
307
  # @param [] enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
308
308
  #
309
309
  # @return [Collection]
@@ -1223,7 +1223,7 @@ module Appwrite
1223
1223
 
1224
1224
 
1225
1225
  # Create relationship attribute. [Learn more about relationship
1226
- # attributes](/docs/databases-relationships#relationship-attributes).
1226
+ # attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1227
1227
  #
1228
1228
  #
1229
1229
  # @param [String] database_id Database ID.
@@ -1589,7 +1589,7 @@ module Appwrite
1589
1589
 
1590
1590
 
1591
1591
  # Update relationship attribute. [Learn more about relationship
1592
- # attributes](/docs/databases-relationships#relationship-attributes).
1592
+ # attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1593
1593
  #
1594
1594
  #
1595
1595
  # @param [String] database_id Database ID.
@@ -1675,14 +1675,14 @@ module Appwrite
1675
1675
 
1676
1676
  # Create a new Document. Before using this route, you should create a new
1677
1677
  # collection resource using either a [server
1678
- # integration](/docs/server/databases#databasesCreateCollection) API or
1679
- # directly from your database console.
1678
+ # integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
1679
+ # API or directly from your database console.
1680
1680
  #
1681
1681
  # @param [String] database_id Database ID.
1682
1682
  # @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.
1683
1683
  # @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.
1684
1684
  # @param [Hash] data Document data as JSON object.
1685
- # @param [Array] permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
1685
+ # @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).
1686
1686
  #
1687
1687
  # @return [Document]
1688
1688
  def create_document(database_id:, collection_id:, document_id:, data:, permissions: nil)
@@ -1778,7 +1778,7 @@ module Appwrite
1778
1778
  # @param [String] collection_id Collection ID.
1779
1779
  # @param [String] document_id Document ID.
1780
1780
  # @param [Hash] data Document data as JSON object. Include only attribute and value pairs to be updated.
1781
- # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
1781
+ # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
1782
1782
  #
1783
1783
  # @return [Document]
1784
1784
  def update_document(database_id:, collection_id:, document_id:, data: nil, permissions: nil)
@@ -37,8 +37,9 @@ module Appwrite
37
37
 
38
38
 
39
39
  # Create a new function. You can pass a list of
40
- # [permissions](/docs/permissions) to allow different project users or team
41
- # with access to execute the function using the client API.
40
+ # [permissions](https://appwrite.io/docs/permissions) to allow different
41
+ # project users or team with access to execute the function using the client
42
+ # API.
42
43
  #
43
44
  # @param [String] function_id Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
44
45
  # @param [String] name Function name. Max length: 128 chars.
@@ -188,7 +189,7 @@ module Appwrite
188
189
  # @param [String] provider_root_directory Path to function code in the linked repo.
189
190
  #
190
191
  # @return [Function]
191
- def update(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil)
192
+ def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil)
192
193
  api_path = '/functions/{functionId}'
193
194
  .gsub('{functionId}', function_id)
194
195
 
@@ -200,10 +201,6 @@ module Appwrite
200
201
  raise Appwrite::Exception.new('Missing required parameter: "name"')
201
202
  end
202
203
 
203
- if runtime.nil?
204
- raise Appwrite::Exception.new('Missing required parameter: "runtime"')
205
- end
206
-
207
204
  api_params = {
208
205
  name: name,
209
206
  runtime: runtime,
@@ -307,7 +304,7 @@ module Appwrite
307
304
  # This endpoint accepts a tar.gz file compressed with your code. Make sure to
308
305
  # include any dependencies your code has within the compressed file. You can
309
306
  # learn more about code packaging in the [Appwrite Cloud Functions
310
- # tutorial](/docs/functions).
307
+ # tutorial](https://appwrite.io/docs/functions).
311
308
  #
312
309
  # Use the "command" param to set the entrypoint used to execute your code.
313
310
  #
@@ -511,7 +508,8 @@ module Appwrite
511
508
  end
512
509
 
513
510
 
514
- #
511
+ # Get a Deployment's contents by its unique ID. This endpoint supports range
512
+ # requests for partial or streaming file download.
515
513
  #
516
514
  # @param [String] function_id Function ID.
517
515
  # @param [String] deployment_id Deployment ID.
@@ -153,16 +153,101 @@ module Appwrite
153
153
  end
154
154
 
155
155
 
156
+ # Get the number of builds that are waiting to be processed in the Appwrite
157
+ # internal queue server.
158
+ #
159
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
160
+ #
161
+ # @return [HealthQueue]
162
+ def get_queue_builds(threshold: nil)
163
+ api_path = '/health/queue/builds'
164
+
165
+ api_params = {
166
+ threshold: threshold,
167
+ }
168
+
169
+ api_headers = {
170
+ "content-type": 'application/json',
171
+ }
172
+
173
+ @client.call(
174
+ method: 'GET',
175
+ path: api_path,
176
+ headers: api_headers,
177
+ params: api_params,
178
+ response_type: Models::HealthQueue
179
+ )
180
+ end
181
+
182
+
156
183
  # Get the number of certificates that are waiting to be issued against
157
184
  # [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
158
185
  # server.
159
186
  #
187
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
160
188
  #
161
189
  # @return [HealthQueue]
162
- def get_queue_certificates()
190
+ def get_queue_certificates(threshold: nil)
163
191
  api_path = '/health/queue/certificates'
164
192
 
165
193
  api_params = {
194
+ threshold: threshold,
195
+ }
196
+
197
+ api_headers = {
198
+ "content-type": 'application/json',
199
+ }
200
+
201
+ @client.call(
202
+ method: 'GET',
203
+ path: api_path,
204
+ headers: api_headers,
205
+ params: api_params,
206
+ response_type: Models::HealthQueue
207
+ )
208
+ end
209
+
210
+
211
+ # Get the number of database changes that are waiting to be processed in the
212
+ # Appwrite internal queue server.
213
+ #
214
+ # @param [String] name Queue name for which to check the queue size
215
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
216
+ #
217
+ # @return [HealthQueue]
218
+ def get_queue_databases(name: nil, threshold: nil)
219
+ api_path = '/health/queue/databases'
220
+
221
+ api_params = {
222
+ name: name,
223
+ threshold: threshold,
224
+ }
225
+
226
+ api_headers = {
227
+ "content-type": 'application/json',
228
+ }
229
+
230
+ @client.call(
231
+ method: 'GET',
232
+ path: api_path,
233
+ headers: api_headers,
234
+ params: api_params,
235
+ response_type: Models::HealthQueue
236
+ )
237
+ end
238
+
239
+
240
+ # Get the number of background destructive changes that are waiting to be
241
+ # processed in the Appwrite internal queue server.
242
+ #
243
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
244
+ #
245
+ # @return [HealthQueue]
246
+ def get_queue_deletes(threshold: nil)
247
+ api_path = '/health/queue/deletes'
248
+
249
+ api_params = {
250
+ threshold: threshold,
166
251
  }
167
252
 
168
253
  api_headers = {
@@ -181,12 +266,14 @@ module Appwrite
181
266
 
182
267
  #
183
268
  #
269
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
184
270
  #
185
271
  # @return [HealthQueue]
186
- def get_queue_functions()
272
+ def get_queue_functions(threshold: nil)
187
273
  api_path = '/health/queue/functions'
188
274
 
189
275
  api_params = {
276
+ threshold: threshold,
190
277
  }
191
278
 
192
279
  api_headers = {
@@ -206,12 +293,95 @@ module Appwrite
206
293
  # Get the number of logs that are waiting to be processed in the Appwrite
207
294
  # internal queue server.
208
295
  #
296
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
209
297
  #
210
298
  # @return [HealthQueue]
211
- def get_queue_logs()
299
+ def get_queue_logs(threshold: nil)
212
300
  api_path = '/health/queue/logs'
213
301
 
214
302
  api_params = {
303
+ threshold: threshold,
304
+ }
305
+
306
+ api_headers = {
307
+ "content-type": 'application/json',
308
+ }
309
+
310
+ @client.call(
311
+ method: 'GET',
312
+ path: api_path,
313
+ headers: api_headers,
314
+ params: api_params,
315
+ response_type: Models::HealthQueue
316
+ )
317
+ end
318
+
319
+
320
+ # Get the number of mails that are waiting to be processed in the Appwrite
321
+ # internal queue server.
322
+ #
323
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
324
+ #
325
+ # @return [HealthQueue]
326
+ def get_queue_mails(threshold: nil)
327
+ api_path = '/health/queue/mails'
328
+
329
+ api_params = {
330
+ threshold: threshold,
331
+ }
332
+
333
+ api_headers = {
334
+ "content-type": 'application/json',
335
+ }
336
+
337
+ @client.call(
338
+ method: 'GET',
339
+ path: api_path,
340
+ headers: api_headers,
341
+ params: api_params,
342
+ response_type: Models::HealthQueue
343
+ )
344
+ end
345
+
346
+
347
+ # Get the number of messages that are waiting to be processed in the Appwrite
348
+ # internal queue server.
349
+ #
350
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
351
+ #
352
+ # @return [HealthQueue]
353
+ def get_queue_messaging(threshold: nil)
354
+ api_path = '/health/queue/messaging'
355
+
356
+ api_params = {
357
+ threshold: threshold,
358
+ }
359
+
360
+ api_headers = {
361
+ "content-type": 'application/json',
362
+ }
363
+
364
+ @client.call(
365
+ method: 'GET',
366
+ path: api_path,
367
+ headers: api_headers,
368
+ params: api_params,
369
+ response_type: Models::HealthQueue
370
+ )
371
+ end
372
+
373
+
374
+ # Get the number of migrations that are waiting to be processed in the
375
+ # Appwrite internal queue server.
376
+ #
377
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
378
+ #
379
+ # @return [HealthQueue]
380
+ def get_queue_migrations(threshold: nil)
381
+ api_path = '/health/queue/migrations'
382
+
383
+ api_params = {
384
+ threshold: threshold,
215
385
  }
216
386
 
217
387
  api_headers = {
@@ -231,12 +401,14 @@ module Appwrite
231
401
  # Get the number of webhooks that are waiting to be processed in the Appwrite
232
402
  # internal queue server.
233
403
  #
404
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
234
405
  #
235
406
  # @return [HealthQueue]
236
- def get_queue_webhooks()
407
+ def get_queue_webhooks(threshold: nil)
237
408
  api_path = '/health/queue/webhooks'
238
409
 
239
410
  api_params = {
411
+ threshold: threshold,
240
412
  }
241
413
 
242
414
  api_headers = {
@@ -40,8 +40,8 @@ module Appwrite
40
40
  #
41
41
  # @param [String] bucket_id Unique 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.
42
42
  # @param [String] name Bucket name
43
- # @param [Array] permissions An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](/docs/permissions).
44
- # @param [] file_security Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).
43
+ # @param [Array] permissions An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
44
+ # @param [] file_security Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
45
45
  # @param [] enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
46
46
  # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB.
47
47
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
@@ -123,8 +123,8 @@ module Appwrite
123
123
  #
124
124
  # @param [String] bucket_id Bucket unique ID.
125
125
  # @param [String] name Bucket name
126
- # @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
127
- # @param [] file_security Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](/docs/permissions).
126
+ # @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
127
+ # @param [] file_security Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
128
128
  # @param [] enabled Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
129
129
  # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 30MB.
130
130
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
@@ -203,7 +203,7 @@ module Appwrite
203
203
  # Get a list of all the user files. You can use the query params to filter
204
204
  # your results.
205
205
  #
206
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
206
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
207
207
  # @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
208
208
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
209
209
  #
@@ -237,8 +237,8 @@ module Appwrite
237
237
 
238
238
  # Create a new file. Before using this route, you should create a new bucket
239
239
  # resource using either a [server
240
- # integration](/docs/server/storage#storageCreateBucket) API or directly from
241
- # your Appwrite console.
240
+ # integration](https://appwrite.io/docs/server/storage#storageCreateBucket)
241
+ # API or directly from your Appwrite console.
242
242
  #
243
243
  # Larger files should be uploaded using multiple requests with the
244
244
  # [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
@@ -254,10 +254,10 @@ module Appwrite
254
254
  # chunking logic will be managed by the SDK internally.
255
255
  #
256
256
  #
257
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
257
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
258
258
  # @param [String] file_id File 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.
259
- # @param [file] file Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](/docs/storage#file-input).
260
- # @param [Array] permissions An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](/docs/permissions).
259
+ # @param [file] file Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/storage#file-input).
260
+ # @param [Array] permissions An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
261
261
  #
262
262
  # @return [File]
263
263
  def create_file(bucket_id:, file_id:, file:, permissions: nil, on_progress: nil)
@@ -304,7 +304,7 @@ module Appwrite
304
304
  # Get a file by its unique ID. This endpoint response returns a JSON object
305
305
  # with the file metadata.
306
306
  #
307
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
307
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
308
308
  # @param [String] file_id File ID.
309
309
  #
310
310
  # @return [File]
@@ -341,10 +341,10 @@ module Appwrite
341
341
  # Update a file by its unique ID. Only users with write permissions have
342
342
  # access to update this resource.
343
343
  #
344
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
344
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
345
345
  # @param [String] file_id File unique ID.
346
346
  # @param [String] name Name of the file
347
- # @param [Array] permissions An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](/docs/permissions).
347
+ # @param [Array] permissions An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
348
348
  #
349
349
  # @return [File]
350
350
  def update_file(bucket_id:, file_id:, name: nil, permissions: nil)
@@ -382,7 +382,7 @@ module Appwrite
382
382
  # Delete a file by its unique ID. Only users with write permissions have
383
383
  # access to delete this resource.
384
384
  #
385
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
385
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
386
386
  # @param [String] file_id File ID.
387
387
  #
388
388
  # @return []
@@ -419,7 +419,7 @@ module Appwrite
419
419
  # 'Content-Disposition: attachment' header that tells the browser to start
420
420
  # downloading the file to user downloads directory.
421
421
  #
422
- # @param [String] bucket_id Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
422
+ # @param [String] bucket_id Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
423
423
  # @param [String] file_id File ID.
424
424
  #
425
425
  # @return []
@@ -458,7 +458,7 @@ module Appwrite
458
458
  # string arguments for cutting and resizing your preview image. Preview is
459
459
  # supported only for image files smaller than 10MB.
460
460
  #
461
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
461
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
462
462
  # @param [String] file_id File ID
463
463
  # @param [Integer] width Resize preview image width, Pass an integer between 0 to 4000.
464
464
  # @param [Integer] height Resize preview image height, Pass an integer between 0 to 4000.
@@ -517,7 +517,7 @@ module Appwrite
517
517
  # download method but returns with no 'Content-Disposition: attachment'
518
518
  # header.
519
519
  #
520
- # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).
520
+ # @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
521
521
  # @param [String] file_id File ID.
522
522
  #
523
523
  # @return []
@@ -42,7 +42,7 @@ module Appwrite
42
42
  #
43
43
  # @param [String] team_id Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
44
44
  # @param [String] name Team name. Max length: 128 chars.
45
- # @param [Array] roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
45
+ # @param [Array] roles Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
46
46
  #
47
47
  # @return [Team]
48
48
  def create(team_id:, name:, roles: nil)
@@ -220,8 +220,8 @@ module Appwrite
220
220
  #
221
221
  # Use the `url` parameter to redirect the user from the invitation email to
222
222
  # your app. After the user is redirected, use the [Update Team Membership
223
- # Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow
224
- # the user to accept the invitation to the team.
223
+ # Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus)
224
+ # endpoint to allow the user to accept the invitation to the team.
225
225
  #
226
226
  # Please note that to avoid a [Redirect
227
227
  # Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
@@ -230,15 +230,15 @@ module Appwrite
230
230
  #
231
231
  #
232
232
  # @param [String] team_id Team ID.
233
- # @param [Array] roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
234
- # @param [String] url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project 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.
233
+ # @param [Array] roles Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
235
234
  # @param [String] email Email of the new team member.
236
235
  # @param [String] user_id ID of the user to be added to a team.
237
236
  # @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
237
+ # @param [String] url URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project 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.
238
238
  # @param [String] name Name of the new team member. Max length: 128 chars.
239
239
  #
240
240
  # @return [Membership]
241
- def create_membership(team_id:, roles:, url:, email: nil, user_id: nil, phone: nil, name: nil)
241
+ def create_membership(team_id:, roles:, email: nil, user_id: nil, phone: nil, url: nil, name: nil)
242
242
  api_path = '/teams/{teamId}/memberships'
243
243
  .gsub('{teamId}', team_id)
244
244
 
@@ -250,10 +250,6 @@ module Appwrite
250
250
  raise Appwrite::Exception.new('Missing required parameter: "roles"')
251
251
  end
252
252
 
253
- if url.nil?
254
- raise Appwrite::Exception.new('Missing required parameter: "url"')
255
- end
256
-
257
253
  api_params = {
258
254
  email: email,
259
255
  userId: user_id,
@@ -316,7 +312,7 @@ module Appwrite
316
312
 
317
313
  # Modify the roles of a team member. Only team members with the owner role
318
314
  # have access to this endpoint. Learn more about [roles and
319
- # permissions](/docs/permissions).
315
+ # permissions](https://appwrite.io/docs/permissions).
320
316
  #
321
317
  #
322
318
  # @param [String] team_id Team ID.
@@ -452,7 +448,7 @@ module Appwrite
452
448
 
453
449
  # Get the team's shared preferences by its unique ID. If a preference doesn't
454
450
  # need to be shared by all team members, prefer storing them in [user
455
- # preferences](/docs/client/account#accountGetPrefs).
451
+ # preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
456
452
  #
457
453
  # @param [String] team_id Team ID.
458
454
  #
@@ -76,8 +76,8 @@ module Appwrite
76
76
 
77
77
  # Create a new user. Password provided must be hashed with the
78
78
  # [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST
79
- # /users](/docs/server/users#usersCreate) endpoint to create users with a
80
- # plain text password.
79
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
80
+ # create users with a plain text password.
81
81
  #
82
82
  # @param [String] user_id User 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.
83
83
  # @param [String] email User email.
@@ -123,8 +123,8 @@ module Appwrite
123
123
 
124
124
  # Create a new user. Password provided must be hashed with the
125
125
  # [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST
126
- # /users](/docs/server/users#usersCreate) endpoint to create users with a
127
- # plain text password.
126
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
127
+ # create users with a plain text password.
128
128
  #
129
129
  # @param [String] user_id User 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.
130
130
  # @param [String] email User email.
@@ -227,8 +227,8 @@ module Appwrite
227
227
 
228
228
  # Create a new user. Password provided must be hashed with the
229
229
  # [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST
230
- # /users](/docs/server/users#usersCreate) endpoint to create users with a
231
- # plain text password.
230
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
231
+ # create users with a plain text password.
232
232
  #
233
233
  # @param [String] user_id User 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.
234
234
  # @param [String] email User email.
@@ -274,8 +274,8 @@ module Appwrite
274
274
 
275
275
  # Create a new user. Password provided must be hashed with the
276
276
  # [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST
277
- # /users](/docs/server/users#usersCreate) endpoint to create users with a
278
- # plain text password.
277
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
278
+ # create users with a plain text password.
279
279
  #
280
280
  # @param [String] user_id User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. 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.
281
281
  # @param [String] email User email.
@@ -321,8 +321,8 @@ module Appwrite
321
321
 
322
322
  # Create a new user. Password provided must be hashed with the
323
323
  # [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST
324
- # /users](/docs/server/users#usersCreate) endpoint to create users with a
325
- # plain text password.
324
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
325
+ # create users with a plain text password.
326
326
  #
327
327
  # @param [String] user_id User 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.
328
328
  # @param [String] email User email.
@@ -398,8 +398,9 @@ module Appwrite
398
398
 
399
399
  # Create a new user. Password provided must be hashed with the [Scrypt
400
400
  # Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc)
401
- # algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint
402
- # to create users with a plain text password.
401
+ # algorithm. Use the [POST
402
+ # /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to
403
+ # create users with a plain text password.
403
404
  #
404
405
  # @param [String] user_id User 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.
405
406
  # @param [String] email User email.
@@ -463,8 +464,8 @@ module Appwrite
463
464
 
464
465
  # Create a new user. Password provided must be hashed with the
465
466
  # [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use
466
- # the [POST /users](/docs/server/users#usersCreate) endpoint to create users
467
- # with a plain text password.
467
+ # the [POST /users](https://appwrite.io/docs/server/users#usersCreate)
468
+ # endpoint to create users with a plain text password.
468
469
  #
469
470
  # @param [String] user_id User 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.
470
471
  # @param [String] email User email.
@@ -543,7 +544,8 @@ module Appwrite
543
544
  # Delete a user by its unique ID, thereby releasing it's ID. Since ID is
544
545
  # released and can be reused, all user-related resources like documents or
545
546
  # storage files should be deleted before user deletion. If you want to keep
546
- # ID reserved, use the [updateStatus](/docs/server/users#usersUpdateStatus)
547
+ # ID reserved, use the
548
+ # [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus)
547
549
  # endpoint instead.
548
550
  #
549
551
  # @param [String] user_id User ID.
@@ -614,10 +616,10 @@ module Appwrite
614
616
  # Labels can be used to grant access to resources. While teams are a way for
615
617
  # user's to share access to a resource, labels can be defined by the
616
618
  # developer to grant access without an invitation. See the [Permissions
617
- # docs](/docs/permissions) for more info.
619
+ # docs](https://appwrite.io/docs/permissions) for more info.
618
620
  #
619
621
  # @param [String] user_id User ID.
620
- # @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
622
+ # @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long.
621
623
  #
622
624
  # @return [User]
623
625
  def update_labels(user_id:, labels:)
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: 9.0.1
4
+ version: 10.1.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: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2023-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types