appwrite 30.1.0 → 30.3.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +16 -2
  3. data/lib/appwrite/enums/appwrite_migration_resource.rb +1 -0
  4. data/lib/appwrite/enums/image_format.rb +1 -0
  5. data/lib/appwrite/enums/o_auth_provider.rb +3 -0
  6. data/lib/appwrite/enums/project_auth_method_id.rb +1 -0
  7. data/lib/appwrite/enums/project_key_scopes.rb +12 -0
  8. data/lib/appwrite/enums/project_ldap_encryption.rb +9 -0
  9. data/lib/appwrite/enums/project_o_auth_provider_id.rb +3 -0
  10. data/lib/appwrite/enums/project_policy_id.rb +1 -0
  11. data/lib/appwrite/models/activity_event.rb +9 -4
  12. data/lib/appwrite/models/device.rb +58 -0
  13. data/lib/appwrite/models/domain_price.rb +8 -3
  14. data/lib/appwrite/models/environment.rb +48 -0
  15. data/lib/appwrite/models/environment_list.rb +33 -0
  16. data/lib/appwrite/models/o_auth2_naver.rb +43 -0
  17. data/lib/appwrite/models/o_auth2_vipps.rb +43 -0
  18. data/lib/appwrite/models/organization.rb +16 -1
  19. data/lib/appwrite/models/policy_account_devices.rb +33 -0
  20. data/lib/appwrite/models/project.rb +91 -1
  21. data/lib/appwrite/models/project_auth_method.rb +1 -0
  22. data/lib/appwrite/models/proxy_rule.rb +11 -1
  23. data/lib/appwrite/models/session.rb +6 -1
  24. data/lib/appwrite/models/site.rb +14 -4
  25. data/lib/appwrite/models/waf_rule_bypass.rb +8 -3
  26. data/lib/appwrite/models/waf_rule_challenge.rb +5 -0
  27. data/lib/appwrite/models/waf_rule_deny.rb +8 -3
  28. data/lib/appwrite/models/waf_rule_rate_limit.rb +5 -0
  29. data/lib/appwrite/models/waf_rule_redirect.rb +5 -0
  30. data/lib/appwrite/services/account.rb +206 -1
  31. data/lib/appwrite/services/avatars.rb +5 -2
  32. data/lib/appwrite/services/domains.rb +7 -6
  33. data/lib/appwrite/services/project.rb +402 -21
  34. data/lib/appwrite/services/proxy.rb +154 -1
  35. data/lib/appwrite/services/sites.rb +44 -0
  36. data/lib/appwrite/services/storage.rb +7 -4
  37. data/lib/appwrite/services/waf.rb +40 -10
  38. data/lib/appwrite.rb +7 -0
  39. metadata +9 -2
@@ -386,10 +386,163 @@ module Appwrite
386
386
  )
387
387
  end
388
388
 
389
+ # Update the function and VCS branch a function proxy rule executes. The rule
390
+ # domain cannot be changed.
391
+ #
392
+ # @param [String] rule_id Rule ID.
393
+ # @param [String] function_id ID of function to be executed.
394
+ # @param [String] branch Name of VCS branch to deploy changes automatically
395
+ #
396
+ # @return [ProxyRule]
397
+ def update_function_rule(
398
+ rule_id:,
399
+ function_id:,
400
+ branch: nil
401
+ )
402
+ if rule_id.nil? || rule_id == ''
403
+ raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
404
+ end
405
+
406
+ if function_id.nil?
407
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
408
+ end
409
+
410
+ api_path = '/proxy/rules/{ruleId}/function'
411
+ .gsub('{ruleId}', @client.encode_path(rule_id))
412
+
413
+ api_params = {
414
+ functionId: function_id,
415
+ branch: branch,
416
+ }
417
+
418
+ api_headers = {
419
+ "X-Appwrite-Project": @client.get_config('project'),
420
+ "content-type": 'application/json',
421
+ "accept": 'application/json',
422
+ }
423
+
424
+ @client.call(
425
+ method: 'PATCH',
426
+ path: api_path,
427
+ headers: api_headers,
428
+ params: api_params,
429
+ response_type: Models::ProxyRule
430
+ )
431
+ end
432
+
433
+ # Update the target URL, status code and parent resource of a redirect proxy
434
+ # rule. The rule domain cannot be changed.
435
+ #
436
+ # @param [String] rule_id Rule ID.
437
+ # @param [String] url Target URL of redirection
438
+ # @param [StatusCode] status_code Status code of redirection
439
+ # @param [String] resource_id ID of parent resource.
440
+ # @param [ProxyResourceType] resource_type Type of parent resource.
441
+ #
442
+ # @return [ProxyRule]
443
+ def update_redirect_rule(
444
+ rule_id:,
445
+ url:,
446
+ status_code:,
447
+ resource_id:,
448
+ resource_type:
449
+ )
450
+ if rule_id.nil? || rule_id == ''
451
+ raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
452
+ end
453
+
454
+ if url.nil?
455
+ raise Appwrite::Exception.new('Missing required parameter: "url"')
456
+ end
457
+
458
+ if status_code.nil?
459
+ raise Appwrite::Exception.new('Missing required parameter: "statusCode"')
460
+ end
461
+
462
+ if resource_id.nil?
463
+ raise Appwrite::Exception.new('Missing required parameter: "resourceId"')
464
+ end
465
+
466
+ if resource_type.nil?
467
+ raise Appwrite::Exception.new('Missing required parameter: "resourceType"')
468
+ end
469
+
470
+ api_path = '/proxy/rules/{ruleId}/redirect'
471
+ .gsub('{ruleId}', @client.encode_path(rule_id))
472
+
473
+ api_params = {
474
+ url: url,
475
+ statusCode: status_code,
476
+ resourceId: resource_id,
477
+ resourceType: resource_type,
478
+ }
479
+
480
+ api_headers = {
481
+ "X-Appwrite-Project": @client.get_config('project'),
482
+ "content-type": 'application/json',
483
+ "accept": 'application/json',
484
+ }
485
+
486
+ @client.call(
487
+ method: 'PATCH',
488
+ path: api_path,
489
+ headers: api_headers,
490
+ params: api_params,
491
+ response_type: Models::ProxyRule
492
+ )
493
+ end
494
+
495
+ # Update the site and VCS branch a site proxy rule serves. The rule domain
496
+ # cannot be changed.
497
+ #
498
+ # @param [String] rule_id Rule ID.
499
+ # @param [String] site_id ID of site to be executed.
500
+ # @param [String] branch Name of VCS branch to deploy changes automatically
501
+ #
502
+ # @return [ProxyRule]
503
+ def update_site_rule(
504
+ rule_id:,
505
+ site_id:,
506
+ branch: nil
507
+ )
508
+ if rule_id.nil? || rule_id == ''
509
+ raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
510
+ end
511
+
512
+ if site_id.nil?
513
+ raise Appwrite::Exception.new('Missing required parameter: "siteId"')
514
+ end
515
+
516
+ api_path = '/proxy/rules/{ruleId}/site'
517
+ .gsub('{ruleId}', @client.encode_path(rule_id))
518
+
519
+ api_params = {
520
+ siteId: site_id,
521
+ branch: branch,
522
+ }
523
+
524
+ api_headers = {
525
+ "X-Appwrite-Project": @client.get_config('project'),
526
+ "content-type": 'application/json',
527
+ "accept": 'application/json',
528
+ }
529
+
530
+ @client.call(
531
+ method: 'PATCH',
532
+ path: api_path,
533
+ headers: api_headers,
534
+ params: api_params,
535
+ response_type: Models::ProxyRule
536
+ )
537
+ end
538
+
389
539
  # If not succeeded yet, retry verification process of a proxy rule domain.
390
540
  # This endpoint triggers domain verification by checking DNS records. If
391
541
  # verification is successful, a TLS certificate will be automatically
392
- # provisioned for the domain asynchronously in the background.
542
+ # provisioned for the domain asynchronously in the background. A verified
543
+ # rule whose certificate renewal failed or is blocked, or whose certificate
544
+ # expired, is checked the same way, and its certificate renewed in the
545
+ # background.
393
546
  #
394
547
  # @param [String] rule_id Rule ID.
395
548
  #
@@ -393,6 +393,50 @@ module Appwrite
393
393
  )
394
394
  end
395
395
 
396
+ # Turn analytics on or off for a site. Turning it on links an analytics
397
+ # property named after the site, creating one on first use, and injects the
398
+ # tracker into pages served on the site's production domains. Turning it on
399
+ # also needs the `analytics.write` scope. Turning it off stops the injection
400
+ # and keeps the property and its data.
401
+ #
402
+ # @param [String] site_id Site ID.
403
+ # @param [] enabled Inject the analytics tracker into the site's production domains. Injected pageviews and events are billed as analytics usage.
404
+ #
405
+ # @return [Site]
406
+ def update_analytics(
407
+ site_id:,
408
+ enabled:
409
+ )
410
+ if site_id.nil? || site_id == ''
411
+ raise Appwrite::Exception.new('Missing required parameter: "siteId"')
412
+ end
413
+
414
+ if enabled.nil?
415
+ raise Appwrite::Exception.new('Missing required parameter: "enabled"')
416
+ end
417
+
418
+ api_path = '/sites/{siteId}/analytics'
419
+ .gsub('{siteId}', @client.encode_path(site_id))
420
+
421
+ api_params = {
422
+ enabled: enabled,
423
+ }
424
+
425
+ api_headers = {
426
+ "X-Appwrite-Project": @client.get_config('project'),
427
+ "content-type": 'application/json',
428
+ "accept": 'application/json',
429
+ }
430
+
431
+ @client.call(
432
+ method: 'PATCH',
433
+ path: api_path,
434
+ headers: api_headers,
435
+ params: api_params,
436
+ response_type: Models::Site
437
+ )
438
+ end
439
+
396
440
  # Update the site active deployment. Use this endpoint to switch the code
397
441
  # deployment that should be used when visitor opens your site.
398
442
  #
@@ -51,7 +51,7 @@ module Appwrite
51
51
  # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 5GB.
52
52
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
53
53
  # @param [Compression] compression Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
54
- # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
54
+ # @param [] encryption Is encryption enabled? Files of any size are encrypted.
55
55
  # @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
56
56
  # @param [] transformations Are image transformations enabled?
57
57
  # @param [String] description Optional description for the bucket.
@@ -156,7 +156,7 @@ module Appwrite
156
156
  # @param [Integer] maximum_file_size Maximum file size allowed in bytes. Maximum allowed value is 5GB.
157
157
  # @param [Array] allowed_file_extensions Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
158
158
  # @param [Compression] compression Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
159
- # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
159
+ # @param [] encryption Is encryption enabled? Files of any size are encrypted.
160
160
  # @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
161
161
  # @param [] transformations Are image transformations enabled?
162
162
  # @param [String] description Optional description for the bucket.
@@ -540,9 +540,12 @@ module Appwrite
540
540
  # Get a file preview image. Currently, this method supports preview for image
541
541
  # files (jpg, png, and gif), other supported formats, like pdf, docs, slides,
542
542
  # and spreadsheets, will return the file icon image. You can also pass query
543
- # string arguments for cutting and resizing your preview image. Preview is
543
+ # string arguments for cutting and resizing your preview image. Set `output`
544
+ # to `auto` to receive avif or webp when the client's `Accept` header
545
+ # supports it, falling back to the original image format. Preview is
544
546
  # supported only for image files smaller than 10MB.
545
547
  #
548
+ #
546
549
  # @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).
547
550
  # @param [String] file_id File ID
548
551
  # @param [Integer] width Resize preview image width, Pass an integer between 0 to 4000.
@@ -555,7 +558,7 @@ module Appwrite
555
558
  # @param [Float] opacity Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
556
559
  # @param [Integer] rotation Preview image rotation in degrees. Pass an integer between -360 and 360.
557
560
  # @param [String] background Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
558
- # @param [ImageFormat] output Output format type (jpeg, jpg, png, gif and webp).
561
+ # @param [ImageFormat] output Output format type (jpeg, jpg, png, gif, webp, heic and avif). Pass auto to serve avif or webp when the client's Accept header supports it, falling back to the original format.
559
562
  # @param [String] token File token for accessing this file.
560
563
  #
561
564
  # @return []
@@ -57,6 +57,7 @@ module Appwrite
57
57
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
58
58
  # @param [] enabled Set to false to create the rule in a disabled state.
59
59
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
60
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
60
61
  #
61
62
  # @return [WafRuleBypass]
62
63
  def create_bypass_rule(
@@ -67,7 +68,8 @@ module Appwrite
67
68
  description: nil,
68
69
  priority: nil,
69
70
  enabled: nil,
70
- conditions: nil
71
+ conditions: nil,
72
+ schedule: nil
71
73
  )
72
74
  if rule_id.nil?
73
75
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -92,6 +94,7 @@ module Appwrite
92
94
  priority: priority,
93
95
  enabled: enabled,
94
96
  conditions: conditions,
97
+ schedule: schedule,
95
98
  }
96
99
 
97
100
  api_headers = {
@@ -125,6 +128,7 @@ module Appwrite
125
128
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
126
129
  # @param [] enabled Set to false to disable the rule.
127
130
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
131
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
128
132
  #
129
133
  # @return [WafRuleBypass]
130
134
  def update_bypass_rule(
@@ -135,7 +139,8 @@ module Appwrite
135
139
  description: nil,
136
140
  priority: nil,
137
141
  enabled: nil,
138
- conditions: nil
142
+ conditions: nil,
143
+ schedule: nil
139
144
  )
140
145
  if rule_id.nil? || rule_id == ''
141
146
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -152,6 +157,7 @@ module Appwrite
152
157
  priority: priority,
153
158
  enabled: enabled,
154
159
  conditions: conditions,
160
+ schedule: schedule,
155
161
  }
156
162
 
157
163
  api_headers = {
@@ -191,6 +197,7 @@ module Appwrite
191
197
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
192
198
  # @param [Integer] difficulty Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
193
199
  # @param [Integer] ttl How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
200
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
194
201
  #
195
202
  # @return [WafRuleChallenge]
196
203
  def create_challenge_rule(
@@ -204,7 +211,8 @@ module Appwrite
204
211
  enabled: nil,
205
212
  conditions: nil,
206
213
  difficulty: nil,
207
- ttl: nil
214
+ ttl: nil,
215
+ schedule: nil
208
216
  )
209
217
  if rule_id.nil?
210
218
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -232,6 +240,7 @@ module Appwrite
232
240
  conditions: conditions,
233
241
  difficulty: difficulty,
234
242
  ttl: ttl,
243
+ schedule: schedule,
235
244
  }
236
245
 
237
246
  api_headers = {
@@ -271,6 +280,7 @@ module Appwrite
271
280
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
272
281
  # @param [Integer] difficulty Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
273
282
  # @param [Integer] ttl How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
283
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
274
284
  #
275
285
  # @return [WafRuleChallenge]
276
286
  def update_challenge_rule(
@@ -284,7 +294,8 @@ module Appwrite
284
294
  enabled: nil,
285
295
  conditions: nil,
286
296
  difficulty: nil,
287
- ttl: nil
297
+ ttl: nil,
298
+ schedule: nil
288
299
  )
289
300
  if rule_id.nil? || rule_id == ''
290
301
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -304,6 +315,7 @@ module Appwrite
304
315
  conditions: conditions,
305
316
  difficulty: difficulty,
306
317
  ttl: ttl,
318
+ schedule: schedule,
307
319
  }
308
320
 
309
321
  api_headers = {
@@ -347,6 +359,7 @@ module Appwrite
347
359
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
348
360
  # @param [] enabled Set to false to create the rule in a disabled state.
349
361
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
362
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
350
363
  #
351
364
  # @return [WafRuleDeny]
352
365
  def create_deny_rule(
@@ -357,7 +370,8 @@ module Appwrite
357
370
  description: nil,
358
371
  priority: nil,
359
372
  enabled: nil,
360
- conditions: nil
373
+ conditions: nil,
374
+ schedule: nil
361
375
  )
362
376
  if rule_id.nil?
363
377
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -382,6 +396,7 @@ module Appwrite
382
396
  priority: priority,
383
397
  enabled: enabled,
384
398
  conditions: conditions,
399
+ schedule: schedule,
385
400
  }
386
401
 
387
402
  api_headers = {
@@ -425,6 +440,7 @@ module Appwrite
425
440
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
426
441
  # @param [] enabled Set to false to disable the rule.
427
442
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
443
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
428
444
  #
429
445
  # @return [WafRuleDeny]
430
446
  def update_deny_rule(
@@ -435,7 +451,8 @@ module Appwrite
435
451
  description: nil,
436
452
  priority: nil,
437
453
  enabled: nil,
438
- conditions: nil
454
+ conditions: nil,
455
+ schedule: nil
439
456
  )
440
457
  if rule_id.nil? || rule_id == ''
441
458
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -452,6 +469,7 @@ module Appwrite
452
469
  priority: priority,
453
470
  enabled: enabled,
454
471
  conditions: conditions,
472
+ schedule: schedule,
455
473
  }
456
474
 
457
475
  api_headers = {
@@ -492,6 +510,7 @@ module Appwrite
492
510
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
493
511
  # @param [] enabled Set to false to create the rule in a disabled state.
494
512
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
513
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
495
514
  #
496
515
  # @return [WafRuleRateLimit]
497
516
  def create_rate_limit_rule(
@@ -507,7 +526,8 @@ module Appwrite
507
526
  max_bucket_size: nil,
508
527
  priority: nil,
509
528
  enabled: nil,
510
- conditions: nil
529
+ conditions: nil,
530
+ schedule: nil
511
531
  )
512
532
  if rule_id.nil?
513
533
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -545,6 +565,7 @@ module Appwrite
545
565
  priority: priority,
546
566
  enabled: enabled,
547
567
  conditions: conditions,
568
+ schedule: schedule,
548
569
  }
549
570
 
550
571
  api_headers = {
@@ -584,6 +605,7 @@ module Appwrite
584
605
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
585
606
  # @param [] enabled Set to false to disable the rule.
586
607
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
608
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
587
609
  #
588
610
  # @return [WafRuleRateLimit]
589
611
  def update_rate_limit_rule(
@@ -598,7 +620,8 @@ module Appwrite
598
620
  max_bucket_size: nil,
599
621
  priority: nil,
600
622
  enabled: nil,
601
- conditions: nil
623
+ conditions: nil,
624
+ schedule: nil
602
625
  )
603
626
  if rule_id.nil? || rule_id == ''
604
627
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -619,6 +642,7 @@ module Appwrite
619
642
  priority: priority,
620
643
  enabled: enabled,
621
644
  conditions: conditions,
645
+ schedule: schedule,
622
646
  }
623
647
 
624
648
  api_headers = {
@@ -654,6 +678,7 @@ module Appwrite
654
678
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
655
679
  # @param [] enabled Set to false to create the rule in a disabled state.
656
680
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
681
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
657
682
  #
658
683
  # @return [WafRuleRedirect]
659
684
  def create_redirect_rule(
@@ -666,7 +691,8 @@ module Appwrite
666
691
  description: nil,
667
692
  priority: nil,
668
693
  enabled: nil,
669
- conditions: nil
694
+ conditions: nil,
695
+ schedule: nil
670
696
  )
671
697
  if rule_id.nil?
672
698
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -701,6 +727,7 @@ module Appwrite
701
727
  priority: priority,
702
728
  enabled: enabled,
703
729
  conditions: conditions,
730
+ schedule: schedule,
704
731
  }
705
732
 
706
733
  api_headers = {
@@ -736,6 +763,7 @@ module Appwrite
736
763
  # @param [Integer] priority Evaluation priority. Lower numbers run earlier.
737
764
  # @param [] enabled Set to false to disable the rule.
738
765
  # @param [Array] conditions Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
766
+ # @param [Hash] schedule When the rule is active: mode, days, interval, anchor, startTime and endTime (HH:MM), and an optional IANA timezone (UTC by default). Leave out for always on; on update, leave out to keep the current schedule and pass an empty object to remove it.
739
767
  #
740
768
  # @return [WafRuleRedirect]
741
769
  def update_redirect_rule(
@@ -748,7 +776,8 @@ module Appwrite
748
776
  status_code: nil,
749
777
  priority: nil,
750
778
  enabled: nil,
751
- conditions: nil
779
+ conditions: nil,
780
+ schedule: nil
752
781
  )
753
782
  if rule_id.nil? || rule_id == ''
754
783
  raise Appwrite::Exception.new('Missing required parameter: "ruleId"')
@@ -767,6 +796,7 @@ module Appwrite
767
796
  priority: priority,
768
797
  enabled: enabled,
769
798
  conditions: conditions,
799
+ schedule: schedule,
770
800
  }
771
801
 
772
802
  api_headers = {
data/lib/appwrite.rb CHANGED
@@ -125,6 +125,7 @@ require_relative 'appwrite/models/algo_argon2'
125
125
  require_relative 'appwrite/models/account'
126
126
  require_relative 'appwrite/models/preferences'
127
127
  require_relative 'appwrite/models/session'
128
+ require_relative 'appwrite/models/device'
128
129
  require_relative 'appwrite/models/identity'
129
130
  require_relative 'appwrite/models/token'
130
131
  require_relative 'appwrite/models/jwt'
@@ -192,11 +193,13 @@ require_relative 'appwrite/models/o_auth2_keycloak'
192
193
  require_relative 'appwrite/models/o_auth2_oidc'
193
194
  require_relative 'appwrite/models/o_auth2_okta'
194
195
  require_relative 'appwrite/models/o_auth2_kick'
196
+ require_relative 'appwrite/models/o_auth2_vipps'
195
197
  require_relative 'appwrite/models/o_auth2_apple'
196
198
  require_relative 'appwrite/models/o_auth2_microsoft'
197
199
  require_relative 'appwrite/models/o_auth2_resend'
198
200
  require_relative 'appwrite/models/o_auth2_tik_tok'
199
201
  require_relative 'appwrite/models/o_auth2_kakao'
202
+ require_relative 'appwrite/models/o_auth2_naver'
200
203
  require_relative 'appwrite/models/o_auth2_provider_list'
201
204
  require_relative 'appwrite/models/policy_password_dictionary'
202
205
  require_relative 'appwrite/models/policy_password_history'
@@ -217,6 +220,7 @@ require_relative 'appwrite/models/policy_deny_disposable_email'
217
220
  require_relative 'appwrite/models/policy_deny_free_email'
218
221
  require_relative 'appwrite/models/policy_deny_corporate_email'
219
222
  require_relative 'appwrite/models/policy_deny_realtime_guests'
223
+ require_relative 'appwrite/models/policy_account_devices'
220
224
  require_relative 'appwrite/models/platform_web'
221
225
  require_relative 'appwrite/models/platform_apple'
222
226
  require_relative 'appwrite/models/platform_android'
@@ -290,6 +294,8 @@ require_relative 'appwrite/models/backup_policy'
290
294
  require_relative 'appwrite/models/dedicated_database_pooler'
291
295
  require_relative 'appwrite/models/postgres_extension'
292
296
  require_relative 'appwrite/models/program'
297
+ require_relative 'appwrite/models/environment'
298
+ require_relative 'appwrite/models/environment_list'
293
299
  require_relative 'appwrite/models/backup_restoration'
294
300
  require_relative 'appwrite/models/dedicated_database_restoration_list'
295
301
  require_relative 'appwrite/models/dedicated_database_specification'
@@ -376,6 +382,7 @@ require_relative 'appwrite/enums/supabase_migration_resource'
376
382
  require_relative 'appwrite/enums/region'
377
383
  require_relative 'appwrite/enums/project_auth_method_id'
378
384
  require_relative 'appwrite/enums/environment_resource'
385
+ require_relative 'appwrite/enums/project_ldap_encryption'
379
386
  require_relative 'appwrite/enums/project_o_auth2_auth0_prompt'
380
387
  require_relative 'appwrite/enums/project_o_auth2_discord_prompt'
381
388
  require_relative 'appwrite/enums/project_o_auth2_git_hub_prompt'
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: 30.1.0
4
+ version: 30.3.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-10-28 00:00:00.000000000 Z
11
+ date: 2026-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -91,6 +91,7 @@ files:
91
91
  - lib/appwrite/enums/project_email_template_id.rb
92
92
  - lib/appwrite/enums/project_email_template_locale.rb
93
93
  - lib/appwrite/enums/project_key_scopes.rb
94
+ - lib/appwrite/enums/project_ldap_encryption.rb
94
95
  - lib/appwrite/enums/project_o_auth2_auth0_prompt.rb
95
96
  - lib/appwrite/enums/project_o_auth2_discord_prompt.rb
96
97
  - lib/appwrite/enums/project_o_auth2_git_hub_prompt.rb
@@ -244,6 +245,7 @@ files:
244
245
  - lib/appwrite/models/dedicated_database_specification_list.rb
245
246
  - lib/appwrite/models/deployment.rb
246
247
  - lib/appwrite/models/deployment_list.rb
248
+ - lib/appwrite/models/device.rb
247
249
  - lib/appwrite/models/dns_record.rb
248
250
  - lib/appwrite/models/dns_records_list.rb
249
251
  - lib/appwrite/models/document.rb
@@ -257,6 +259,8 @@ files:
257
259
  - lib/appwrite/models/email_template_list.rb
258
260
  - lib/appwrite/models/embedding.rb
259
261
  - lib/appwrite/models/embedding_list.rb
262
+ - lib/appwrite/models/environment.rb
263
+ - lib/appwrite/models/environment_list.rb
260
264
  - lib/appwrite/models/ephemeral_key.rb
261
265
  - lib/appwrite/models/execution.rb
262
266
  - lib/appwrite/models/execution_list.rb
@@ -323,6 +327,7 @@ files:
323
327
  - lib/appwrite/models/o_auth2_kick.rb
324
328
  - lib/appwrite/models/o_auth2_linkedin.rb
325
329
  - lib/appwrite/models/o_auth2_microsoft.rb
330
+ - lib/appwrite/models/o_auth2_naver.rb
326
331
  - lib/appwrite/models/o_auth2_notion.rb
327
332
  - lib/appwrite/models/o_auth2_oidc.rb
328
333
  - lib/appwrite/models/o_auth2_okta.rb
@@ -337,6 +342,7 @@ files:
337
342
  - lib/appwrite/models/o_auth2_tik_tok.rb
338
343
  - lib/appwrite/models/o_auth2_tradeshift.rb
339
344
  - lib/appwrite/models/o_auth2_twitch.rb
345
+ - lib/appwrite/models/o_auth2_vipps.rb
340
346
  - lib/appwrite/models/o_auth2_webflow.rb
341
347
  - lib/appwrite/models/o_auth2_word_press.rb
342
348
  - lib/appwrite/models/o_auth2_x.rb
@@ -372,6 +378,7 @@ files:
372
378
  - lib/appwrite/models/platform_list.rb
373
379
  - lib/appwrite/models/platform_web.rb
374
380
  - lib/appwrite/models/platform_windows.rb
381
+ - lib/appwrite/models/policy_account_devices.rb
375
382
  - lib/appwrite/models/policy_deny_aliased_email.rb
376
383
  - lib/appwrite/models/policy_deny_corporate_email.rb
377
384
  - lib/appwrite/models/policy_deny_disposable_email.rb