appwrite 29.0.0 → 30.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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +3 -3
  3. data/lib/appwrite/models/attribute_bigint.rb +6 -1
  4. data/lib/appwrite/models/attribute_boolean.rb +6 -1
  5. data/lib/appwrite/models/attribute_datetime.rb +6 -1
  6. data/lib/appwrite/models/attribute_email.rb +6 -1
  7. data/lib/appwrite/models/attribute_enum.rb +6 -1
  8. data/lib/appwrite/models/attribute_float.rb +6 -1
  9. data/lib/appwrite/models/attribute_integer.rb +6 -1
  10. data/lib/appwrite/models/attribute_ip.rb +6 -1
  11. data/lib/appwrite/models/attribute_line.rb +6 -1
  12. data/lib/appwrite/models/attribute_longtext.rb +6 -1
  13. data/lib/appwrite/models/attribute_mediumtext.rb +6 -1
  14. data/lib/appwrite/models/attribute_object.rb +6 -1
  15. data/lib/appwrite/models/attribute_point.rb +6 -1
  16. data/lib/appwrite/models/attribute_polygon.rb +6 -1
  17. data/lib/appwrite/models/attribute_relationship.rb +6 -1
  18. data/lib/appwrite/models/attribute_string.rb +6 -1
  19. data/lib/appwrite/models/attribute_text.rb +6 -1
  20. data/lib/appwrite/models/attribute_url.rb +6 -1
  21. data/lib/appwrite/models/attribute_varchar.rb +6 -1
  22. data/lib/appwrite/models/attribute_vector.rb +6 -1
  23. data/lib/appwrite/models/billing_plan.rb +6 -1
  24. data/lib/appwrite/models/bucket.rb +11 -1
  25. data/lib/appwrite/models/collection.rb +6 -1
  26. data/lib/appwrite/models/column_bigint.rb +6 -1
  27. data/lib/appwrite/models/column_boolean.rb +6 -1
  28. data/lib/appwrite/models/column_datetime.rb +6 -1
  29. data/lib/appwrite/models/column_email.rb +6 -1
  30. data/lib/appwrite/models/column_enum.rb +6 -1
  31. data/lib/appwrite/models/column_float.rb +6 -1
  32. data/lib/appwrite/models/column_index.rb +6 -1
  33. data/lib/appwrite/models/column_integer.rb +6 -1
  34. data/lib/appwrite/models/column_ip.rb +6 -1
  35. data/lib/appwrite/models/column_line.rb +6 -1
  36. data/lib/appwrite/models/column_longtext.rb +6 -1
  37. data/lib/appwrite/models/column_mediumtext.rb +6 -1
  38. data/lib/appwrite/models/column_point.rb +6 -1
  39. data/lib/appwrite/models/column_polygon.rb +6 -1
  40. data/lib/appwrite/models/column_relationship.rb +6 -1
  41. data/lib/appwrite/models/column_string.rb +6 -1
  42. data/lib/appwrite/models/column_text.rb +6 -1
  43. data/lib/appwrite/models/column_url.rb +6 -1
  44. data/lib/appwrite/models/column_varchar.rb +6 -1
  45. data/lib/appwrite/models/database.rb +6 -1
  46. data/lib/appwrite/models/ephemeral_key.rb +6 -1
  47. data/lib/appwrite/models/function.rb +6 -1
  48. data/lib/appwrite/models/index.rb +6 -1
  49. data/lib/appwrite/models/key.rb +6 -1
  50. data/lib/appwrite/models/policy_password_dictionary.rb +9 -4
  51. data/lib/appwrite/models/policy_password_personal_data.rb +9 -4
  52. data/lib/appwrite/models/site.rb +6 -1
  53. data/lib/appwrite/models/table.rb +6 -1
  54. data/lib/appwrite/models/topic.rb +6 -1
  55. data/lib/appwrite/models/variable.rb +6 -1
  56. data/lib/appwrite/models/vectorsdb_collection.rb +6 -1
  57. data/lib/appwrite/models/webhook.rb +6 -1
  58. data/lib/appwrite/services/account.rb +48 -0
  59. data/lib/appwrite/services/activities.rb +4 -1
  60. data/lib/appwrite/services/backups.rb +12 -3
  61. data/lib/appwrite/services/databases.rb +233 -42
  62. data/lib/appwrite/services/documents_db.rb +74 -3
  63. data/lib/appwrite/services/domains.rb +8 -2
  64. data/lib/appwrite/services/functions.rb +15 -3
  65. data/lib/appwrite/services/messaging.rb +16 -4
  66. data/lib/appwrite/services/mongo.rb +12 -3
  67. data/lib/appwrite/services/mysql.rb +12 -3
  68. data/lib/appwrite/services/organization.rb +4 -1
  69. data/lib/appwrite/services/postgresql.rb +12 -3
  70. data/lib/appwrite/services/project.rb +38 -5
  71. data/lib/appwrite/services/sites.rb +16 -4
  72. data/lib/appwrite/services/storage.rb +15 -3
  73. data/lib/appwrite/services/tables_db.rb +227 -40
  74. data/lib/appwrite/services/vectors_db.rb +18 -3
  75. data/lib/appwrite/services/webhooks.rb +8 -2
  76. metadata +3 -3
@@ -382,13 +382,15 @@ module Appwrite
382
382
  # @param [String] name Key name. Max length: 128 chars.
383
383
  # @param [Array] scopes Key scopes list. Maximum of 200 scopes are allowed.
384
384
  # @param [String] expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
385
+ # @param [String] description Optional description for the key.
385
386
  #
386
387
  # @return [Key]
387
388
  def update_key(
388
389
  key_id:,
389
390
  name:,
390
391
  scopes:,
391
- expire: nil
392
+ expire: nil,
393
+ description: nil
392
394
  )
393
395
  if key_id.nil? || key_id == ''
394
396
  raise Appwrite::Exception.new('Missing required parameter: "keyId"')
@@ -409,6 +411,7 @@ module Appwrite
409
411
  name: name,
410
412
  scopes: scopes,
411
413
  expire: expire,
414
+ description: description,
412
415
  }
413
416
 
414
417
  api_headers = {
@@ -3771,11 +3774,21 @@ module Appwrite
3771
3774
  # against most common passwords dictionary. When enabled, and user changes
3772
3775
  # their password, password must not be contained in the dictionary.
3773
3776
  #
3777
+ # Custom denyList entries use case-sensitive equality and apply only while
3778
+ # this policy is enabled. Omit denyList or pass null to preserve it, pass an
3779
+ # array to replace it, or pass [] to clear it. Entries are stored without
3780
+ # trimming or deduplication. Existing passwords remain valid for sign-in and
3781
+ # password confirmation. The combined serialized project authentication
3782
+ # configuration must fit within 16,384 characters, even when each list meets
3783
+ # its entry limits.
3784
+ #
3774
3785
  # @param [] enabled Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.
3786
+ # @param [Array] deny_list Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters.
3775
3787
  #
3776
3788
  # @return [Project]
3777
3789
  def update_password_dictionary_policy(
3778
- enabled:
3790
+ enabled:,
3791
+ deny_list: nil
3779
3792
  )
3780
3793
  if enabled.nil?
3781
3794
  raise Appwrite::Exception.new('Missing required parameter: "enabled"')
@@ -3785,6 +3798,7 @@ module Appwrite
3785
3798
 
3786
3799
  api_params = {
3787
3800
  enabled: enabled,
3801
+ denyList: deny_list,
3788
3802
  }
3789
3803
 
3790
3804
  api_headers = {
@@ -3848,11 +3862,23 @@ module Appwrite
3848
3862
  # password, the password must not contain user ID, name, email or phone
3849
3863
  # number.
3850
3864
  #
3865
+ # Custom denyList entries use case-insensitive substring matching and apply
3866
+ # only while this policy is enabled. Omit denyList or pass null to preserve
3867
+ # it, pass an array to replace it, or pass [] to clear it. Entries are stored
3868
+ # without trimming or deduplication. Existing passwords remain valid for
3869
+ # sign-in and password confirmation. The combined serialized project
3870
+ # authentication configuration must fit within 16,384 characters, even when
3871
+ # each list meets its entry limits.
3872
+ # Password recovery also checks the recovered user profile, closing the
3873
+ # previous gap in profile-based personal-data validation.
3874
+ #
3851
3875
  # @param [] enabled Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.
3876
+ # @param [Array] deny_list Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters.
3852
3877
  #
3853
3878
  # @return [Project]
3854
3879
  def update_password_personal_data_policy(
3855
- enabled:
3880
+ enabled:,
3881
+ deny_list: nil
3856
3882
  )
3857
3883
  if enabled.nil?
3858
3884
  raise Appwrite::Exception.new('Missing required parameter: "enabled"')
@@ -3862,6 +3888,7 @@ module Appwrite
3862
3888
 
3863
3889
  api_params = {
3864
3890
  enabled: enabled,
3891
+ denyList: deny_list,
3865
3892
  }
3866
3893
 
3867
3894
  api_headers = {
@@ -4633,13 +4660,15 @@ module Appwrite
4633
4660
  # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
4634
4661
  # @param [String] value Variable value. Max length: 8192 chars.
4635
4662
  # @param [] secret Secret variables can be updated or deleted, but only projects can read them during build and runtime.
4663
+ # @param [String] description Optional description for the variable.
4636
4664
  #
4637
4665
  # @return [Variable]
4638
4666
  def create_variable(
4639
4667
  variable_id:,
4640
4668
  key:,
4641
4669
  value:,
4642
- secret: nil
4670
+ secret: nil,
4671
+ description: nil
4643
4672
  )
4644
4673
  if variable_id.nil?
4645
4674
  raise Appwrite::Exception.new('Missing required parameter: "variableId"')
@@ -4660,6 +4689,7 @@ module Appwrite
4660
4689
  key: key,
4661
4690
  value: value,
4662
4691
  secret: secret,
4692
+ description: description,
4663
4693
  }
4664
4694
 
4665
4695
  api_headers = {
@@ -4714,13 +4744,15 @@ module Appwrite
4714
4744
  # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
4715
4745
  # @param [String] value Variable value. Max length: 8192 chars.
4716
4746
  # @param [] secret Secret variables can be updated or deleted, but only projects can read them during build and runtime.
4747
+ # @param [String] description Optional description for the variable.
4717
4748
  #
4718
4749
  # @return [Variable]
4719
4750
  def update_variable(
4720
4751
  variable_id:,
4721
4752
  key: nil,
4722
4753
  value: nil,
4723
- secret: nil
4754
+ secret: nil,
4755
+ description: nil
4724
4756
  )
4725
4757
  if variable_id.nil? || variable_id == ''
4726
4758
  raise Appwrite::Exception.new('Missing required parameter: "variableId"')
@@ -4733,6 +4765,7 @@ module Appwrite
4733
4765
  key: key,
4734
4766
  value: value,
4735
4767
  secret: secret,
4768
+ description: description,
4736
4769
  }
4737
4770
 
4738
4771
  api_headers = {
@@ -67,6 +67,7 @@ module Appwrite
67
67
  # @param [String] runtime_specification Runtime specification for the SSR executions.
68
68
  # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
69
69
  # @param [Array] scopes List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
70
+ # @param [String] description Optional description for the site.
70
71
  #
71
72
  # @return [Site]
72
73
  def create(
@@ -93,7 +94,8 @@ module Appwrite
93
94
  build_specification: nil,
94
95
  runtime_specification: nil,
95
96
  deployment_retention: nil,
96
- scopes: nil
97
+ scopes: nil,
98
+ description: nil
97
99
  )
98
100
  if site_id.nil?
99
101
  raise Appwrite::Exception.new('Missing required parameter: "siteId"')
@@ -138,6 +140,7 @@ module Appwrite
138
140
  runtimeSpecification: runtime_specification,
139
141
  deploymentRetention: deployment_retention,
140
142
  scopes: scopes,
143
+ description: description,
141
144
  }
142
145
 
143
146
  api_headers = {
@@ -272,6 +275,7 @@ module Appwrite
272
275
  # @param [String] runtime_specification Runtime specification for the SSR executions.
273
276
  # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
274
277
  # @param [Array] scopes List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
278
+ # @param [String] description Optional description for the site.
275
279
  #
276
280
  # @return [Site]
277
281
  def update(
@@ -298,7 +302,8 @@ module Appwrite
298
302
  build_specification: nil,
299
303
  runtime_specification: nil,
300
304
  deployment_retention: nil,
301
- scopes: nil
305
+ scopes: nil,
306
+ description: nil
302
307
  )
303
308
  if site_id.nil? || site_id == ''
304
309
  raise Appwrite::Exception.new('Missing required parameter: "siteId"')
@@ -339,6 +344,7 @@ module Appwrite
339
344
  runtimeSpecification: runtime_specification,
340
345
  deploymentRetention: deployment_retention,
341
346
  scopes: scopes,
347
+ description: description,
342
348
  }
343
349
 
344
350
  api_headers = {
@@ -1028,6 +1034,7 @@ module Appwrite
1028
1034
  # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
1029
1035
  # @param [String] value Variable value. Max length: 8192 chars.
1030
1036
  # @param [] secret Secret variables can be updated or deleted, but only sites can read them during build and runtime.
1037
+ # @param [String] description Optional description for the variable.
1031
1038
  #
1032
1039
  # @return [Variable]
1033
1040
  def create_variable(
@@ -1035,7 +1042,8 @@ module Appwrite
1035
1042
  variable_id:,
1036
1043
  key:,
1037
1044
  value:,
1038
- secret: nil
1045
+ secret: nil,
1046
+ description: nil
1039
1047
  )
1040
1048
  if site_id.nil? || site_id == ''
1041
1049
  raise Appwrite::Exception.new('Missing required parameter: "siteId"')
@@ -1061,6 +1069,7 @@ module Appwrite
1061
1069
  key: key,
1062
1070
  value: value,
1063
1071
  secret: secret,
1072
+ description: description,
1064
1073
  }
1065
1074
 
1066
1075
  api_headers = {
@@ -1123,6 +1132,7 @@ module Appwrite
1123
1132
  # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
1124
1133
  # @param [String] value Variable value. Max length: 8192 chars.
1125
1134
  # @param [] secret Secret variables can be updated or deleted, but only sites can read them during build and runtime.
1135
+ # @param [String] description Optional description for the variable.
1126
1136
  #
1127
1137
  # @return [Variable]
1128
1138
  def update_variable(
@@ -1130,7 +1140,8 @@ module Appwrite
1130
1140
  variable_id:,
1131
1141
  key: nil,
1132
1142
  value: nil,
1133
- secret: nil
1143
+ secret: nil,
1144
+ description: nil
1134
1145
  )
1135
1146
  if site_id.nil? || site_id == ''
1136
1147
  raise Appwrite::Exception.new('Missing required parameter: "siteId"')
@@ -1148,6 +1159,7 @@ module Appwrite
1148
1159
  key: key,
1149
1160
  value: value,
1150
1161
  secret: secret,
1162
+ description: description,
1151
1163
  }
1152
1164
 
1153
1165
  api_headers = {
@@ -9,7 +9,7 @@ module Appwrite
9
9
  # Get a list of all the storage buckets. You can use the query params to
10
10
  # filter your results.
11
11
  #
12
- # @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
12
+ # @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations, stripMetadata
13
13
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
14
14
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
15
15
  #
@@ -54,6 +54,8 @@ module Appwrite
54
54
  # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
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
+ # @param [String] description Optional description for the bucket.
58
+ # @param [] strip_metadata Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled.
57
59
  #
58
60
  # @return [Bucket]
59
61
  def create_bucket(
@@ -67,7 +69,9 @@ module Appwrite
67
69
  compression: nil,
68
70
  encryption: nil,
69
71
  antivirus: nil,
70
- transformations: nil
72
+ transformations: nil,
73
+ description: nil,
74
+ strip_metadata: nil
71
75
  )
72
76
  if bucket_id.nil?
73
77
  raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
@@ -91,6 +95,8 @@ module Appwrite
91
95
  encryption: encryption,
92
96
  antivirus: antivirus,
93
97
  transformations: transformations,
98
+ description: description,
99
+ stripMetadata: strip_metadata,
94
100
  }
95
101
 
96
102
  api_headers = {
@@ -153,6 +159,8 @@ module Appwrite
153
159
  # @param [] encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
154
160
  # @param [] antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
155
161
  # @param [] transformations Are image transformations enabled?
162
+ # @param [String] description Optional description for the bucket.
163
+ # @param [] strip_metadata Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. By default, the current setting is kept.
156
164
  #
157
165
  # @return [Bucket]
158
166
  def update_bucket(
@@ -166,7 +174,9 @@ module Appwrite
166
174
  compression: nil,
167
175
  encryption: nil,
168
176
  antivirus: nil,
169
- transformations: nil
177
+ transformations: nil,
178
+ description: nil,
179
+ strip_metadata: nil
170
180
  )
171
181
  if bucket_id.nil? || bucket_id == ''
172
182
  raise Appwrite::Exception.new('Missing required parameter: "bucketId"')
@@ -190,6 +200,8 @@ module Appwrite
190
200
  encryption: encryption,
191
201
  antivirus: antivirus,
192
202
  transformations: transformations,
203
+ description: description,
204
+ stripMetadata: strip_metadata,
193
205
  }
194
206
 
195
207
  api_headers = {