appwrite 21.0.0 → 21.0.1

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +1 -1
  3. data/lib/appwrite/enums/backup_services.rb +9 -0
  4. data/lib/appwrite/enums/build_runtime.rb +22 -3
  5. data/lib/appwrite/enums/runtime.rb +22 -3
  6. data/lib/appwrite/enums/scopes.rb +11 -0
  7. data/lib/appwrite/models/activity_event.rb +182 -0
  8. data/lib/appwrite/models/activity_event_list.rb +32 -0
  9. data/lib/appwrite/models/attribute_longtext.rb +8 -3
  10. data/lib/appwrite/models/attribute_mediumtext.rb +8 -3
  11. data/lib/appwrite/models/attribute_text.rb +8 -3
  12. data/lib/appwrite/models/attribute_varchar.rb +8 -3
  13. data/lib/appwrite/models/backup_archive.rb +82 -0
  14. data/lib/appwrite/models/backup_archive_list.rb +32 -0
  15. data/lib/appwrite/models/backup_policy.rb +77 -0
  16. data/lib/appwrite/models/backup_policy_list.rb +32 -0
  17. data/lib/appwrite/models/backup_restoration.rb +77 -0
  18. data/lib/appwrite/models/backup_restoration_list.rb +32 -0
  19. data/lib/appwrite/models/collection.rb +13 -3
  20. data/lib/appwrite/models/column_longtext.rb +8 -3
  21. data/lib/appwrite/models/column_mediumtext.rb +8 -3
  22. data/lib/appwrite/models/column_text.rb +8 -3
  23. data/lib/appwrite/models/column_varchar.rb +8 -3
  24. data/lib/appwrite/models/database.rb +13 -3
  25. data/lib/appwrite/models/table.rb +13 -3
  26. data/lib/appwrite/query.rb +18 -0
  27. data/lib/appwrite/services/activities.rb +64 -0
  28. data/lib/appwrite/services/backups.rb +383 -0
  29. data/lib/appwrite/services/databases.rb +12 -4
  30. data/lib/appwrite/services/health.rb +120 -0
  31. data/lib/appwrite/services/storage.rb +2 -2
  32. data/lib/appwrite/services/tables_db.rb +12 -4
  33. data/lib/appwrite.rb +11 -1
  34. metadata +13 -3
  35. data/lib/appwrite/enums/roles.rb +0 -9
@@ -133,10 +133,28 @@ module Appwrite
133
133
  return Query.new("offset", nil, offset).to_s
134
134
  end
135
135
 
136
+ # Filter resources where attribute contains the specified value.
137
+ # For string attributes, checks if the string contains the substring.
138
+ #
139
+ # Note: For array attributes, use contains_any or contains_all instead.
136
140
  def contains(attribute, value)
137
141
  return Query.new("contains", attribute, value).to_s
138
142
  end
139
143
 
144
+ # Filter resources where attribute contains ANY of the specified values.
145
+ # For array and relationship attributes, matches documents where the attribute
146
+ # contains at least one of the given values.
147
+ def contains_any(attribute, value)
148
+ return Query.new("containsAny", attribute, value).to_s
149
+ end
150
+
151
+ # Filter resources where attribute contains ALL of the specified values.
152
+ # For array and relationship attributes, matches documents where the attribute
153
+ # contains every one of the given values.
154
+ def contains_all(attribute, value)
155
+ return Query.new("containsAll", attribute, value).to_s
156
+ end
157
+
140
158
  def not_contains(attribute, value)
141
159
  return Query.new("notContains", attribute, value).to_s
142
160
  end
@@ -0,0 +1,64 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ class Activities < Service
5
+
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ # List all events for selected filters.
11
+ #
12
+ # @param [String] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.
13
+ #
14
+ # @return [ActivityEventList]
15
+ def list_events(queries: nil)
16
+ api_path = '/activities/events'
17
+
18
+ api_params = {
19
+ queries: queries,
20
+ }
21
+
22
+ api_headers = {
23
+ }
24
+
25
+ @client.call(
26
+ method: 'GET',
27
+ path: api_path,
28
+ headers: api_headers,
29
+ params: api_params,
30
+ response_type: Models::ActivityEventList
31
+ )
32
+ end
33
+
34
+ # Get event by ID.
35
+ #
36
+ #
37
+ # @param [String] event_id Event ID.
38
+ #
39
+ # @return [ActivityEvent]
40
+ def get_event(event_id:)
41
+ api_path = '/activities/events/{eventId}'
42
+ .gsub('{eventId}', event_id)
43
+
44
+ if event_id.nil?
45
+ raise Appwrite::Exception.new('Missing required parameter: "eventId"')
46
+ end
47
+
48
+ api_params = {
49
+ }
50
+
51
+ api_headers = {
52
+ }
53
+
54
+ @client.call(
55
+ method: 'GET',
56
+ path: api_path,
57
+ headers: api_headers,
58
+ params: api_params,
59
+ response_type: Models::ActivityEvent
60
+ )
61
+ end
62
+
63
+ end
64
+ end
@@ -0,0 +1,383 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ class Backups < Service
5
+
6
+ def initialize(client)
7
+ @client = client
8
+ end
9
+
10
+ # List all archives for a project.
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.
13
+ #
14
+ # @return [BackupArchiveList]
15
+ def list_archives(queries: nil)
16
+ api_path = '/backups/archives'
17
+
18
+ api_params = {
19
+ queries: queries,
20
+ }
21
+
22
+ api_headers = {
23
+ }
24
+
25
+ @client.call(
26
+ method: 'GET',
27
+ path: api_path,
28
+ headers: api_headers,
29
+ params: api_params,
30
+ response_type: Models::BackupArchiveList
31
+ )
32
+ end
33
+
34
+ # Create a new archive asynchronously for a project.
35
+ #
36
+ # @param [Array] services Array of services to backup
37
+ # @param [String] resource_id Resource ID. When set, only this single resource will be backed up.
38
+ #
39
+ # @return [BackupArchive]
40
+ def create_archive(services:, resource_id: nil)
41
+ api_path = '/backups/archives'
42
+
43
+ if services.nil?
44
+ raise Appwrite::Exception.new('Missing required parameter: "services"')
45
+ end
46
+
47
+ api_params = {
48
+ services: services,
49
+ resourceId: resource_id,
50
+ }
51
+
52
+ api_headers = {
53
+ "content-type": 'application/json',
54
+ }
55
+
56
+ @client.call(
57
+ method: 'POST',
58
+ path: api_path,
59
+ headers: api_headers,
60
+ params: api_params,
61
+ response_type: Models::BackupArchive
62
+ )
63
+ end
64
+
65
+ # Get a backup archive using it's ID.
66
+ #
67
+ # @param [String] archive_id Archive ID. Choose a custom ID`. 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.
68
+ #
69
+ # @return [BackupArchive]
70
+ def get_archive(archive_id:)
71
+ api_path = '/backups/archives/{archiveId}'
72
+ .gsub('{archiveId}', archive_id)
73
+
74
+ if archive_id.nil?
75
+ raise Appwrite::Exception.new('Missing required parameter: "archiveId"')
76
+ end
77
+
78
+ api_params = {
79
+ }
80
+
81
+ api_headers = {
82
+ }
83
+
84
+ @client.call(
85
+ method: 'GET',
86
+ path: api_path,
87
+ headers: api_headers,
88
+ params: api_params,
89
+ response_type: Models::BackupArchive
90
+ )
91
+ end
92
+
93
+ # Delete an existing archive for a project.
94
+ #
95
+ # @param [String] archive_id Policy 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.
96
+ #
97
+ # @return []
98
+ def delete_archive(archive_id:)
99
+ api_path = '/backups/archives/{archiveId}'
100
+ .gsub('{archiveId}', archive_id)
101
+
102
+ if archive_id.nil?
103
+ raise Appwrite::Exception.new('Missing required parameter: "archiveId"')
104
+ end
105
+
106
+ api_params = {
107
+ }
108
+
109
+ api_headers = {
110
+ "content-type": 'application/json',
111
+ }
112
+
113
+ @client.call(
114
+ method: 'DELETE',
115
+ path: api_path,
116
+ headers: api_headers,
117
+ params: api_params,
118
+ )
119
+ end
120
+
121
+ # List all policies for a project.
122
+ #
123
+ # @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.
124
+ #
125
+ # @return [BackupPolicyList]
126
+ def list_policies(queries: nil)
127
+ api_path = '/backups/policies'
128
+
129
+ api_params = {
130
+ queries: queries,
131
+ }
132
+
133
+ api_headers = {
134
+ }
135
+
136
+ @client.call(
137
+ method: 'GET',
138
+ path: api_path,
139
+ headers: api_headers,
140
+ params: api_params,
141
+ response_type: Models::BackupPolicyList
142
+ )
143
+ end
144
+
145
+ # Create a new backup policy.
146
+ #
147
+ # @param [String] policy_id Policy 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.
148
+ # @param [Array] services Array of services to backup
149
+ # @param [Integer] retention Days to keep backups before deletion
150
+ # @param [String] schedule Schedule CRON syntax.
151
+ # @param [String] name Policy name. Max length: 128 chars.
152
+ # @param [String] resource_id Resource ID. When set, only this single resource will be backed up.
153
+ # @param [] enabled Is policy enabled? When set to 'disabled', no backups will be taken
154
+ #
155
+ # @return [BackupPolicy]
156
+ def create_policy(policy_id:, services:, retention:, schedule:, name: nil, resource_id: nil, enabled: nil)
157
+ api_path = '/backups/policies'
158
+
159
+ if policy_id.nil?
160
+ raise Appwrite::Exception.new('Missing required parameter: "policyId"')
161
+ end
162
+
163
+ if services.nil?
164
+ raise Appwrite::Exception.new('Missing required parameter: "services"')
165
+ end
166
+
167
+ if retention.nil?
168
+ raise Appwrite::Exception.new('Missing required parameter: "retention"')
169
+ end
170
+
171
+ if schedule.nil?
172
+ raise Appwrite::Exception.new('Missing required parameter: "schedule"')
173
+ end
174
+
175
+ api_params = {
176
+ policyId: policy_id,
177
+ name: name,
178
+ services: services,
179
+ resourceId: resource_id,
180
+ enabled: enabled,
181
+ retention: retention,
182
+ schedule: schedule,
183
+ }
184
+
185
+ api_headers = {
186
+ "content-type": 'application/json',
187
+ }
188
+
189
+ @client.call(
190
+ method: 'POST',
191
+ path: api_path,
192
+ headers: api_headers,
193
+ params: api_params,
194
+ response_type: Models::BackupPolicy
195
+ )
196
+ end
197
+
198
+ # Get a backup policy using it's ID.
199
+ #
200
+ # @param [String] policy_id Policy ID. Choose a custom ID`. 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.
201
+ #
202
+ # @return [BackupPolicy]
203
+ def get_policy(policy_id:)
204
+ api_path = '/backups/policies/{policyId}'
205
+ .gsub('{policyId}', policy_id)
206
+
207
+ if policy_id.nil?
208
+ raise Appwrite::Exception.new('Missing required parameter: "policyId"')
209
+ end
210
+
211
+ api_params = {
212
+ }
213
+
214
+ api_headers = {
215
+ }
216
+
217
+ @client.call(
218
+ method: 'GET',
219
+ path: api_path,
220
+ headers: api_headers,
221
+ params: api_params,
222
+ response_type: Models::BackupPolicy
223
+ )
224
+ end
225
+
226
+ # Update an existing policy using it's ID.
227
+ #
228
+ # @param [String] policy_id Policy ID. Choose a custom ID`. 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.
229
+ # @param [String] name Policy name. Max length: 128 chars.
230
+ # @param [Integer] retention Days to keep backups before deletion
231
+ # @param [String] schedule Cron expression
232
+ # @param [] enabled Is Backup enabled? When set to 'disabled', No backup will be taken
233
+ #
234
+ # @return [BackupPolicy]
235
+ def update_policy(policy_id:, name: nil, retention: nil, schedule: nil, enabled: nil)
236
+ api_path = '/backups/policies/{policyId}'
237
+ .gsub('{policyId}', policy_id)
238
+
239
+ if policy_id.nil?
240
+ raise Appwrite::Exception.new('Missing required parameter: "policyId"')
241
+ end
242
+
243
+ api_params = {
244
+ name: name,
245
+ retention: retention,
246
+ schedule: schedule,
247
+ enabled: enabled,
248
+ }
249
+
250
+ api_headers = {
251
+ "content-type": 'application/json',
252
+ }
253
+
254
+ @client.call(
255
+ method: 'PATCH',
256
+ path: api_path,
257
+ headers: api_headers,
258
+ params: api_params,
259
+ response_type: Models::BackupPolicy
260
+ )
261
+ end
262
+
263
+ # Delete a policy using it's ID.
264
+ #
265
+ # @param [String] policy_id Policy 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.
266
+ #
267
+ # @return []
268
+ def delete_policy(policy_id:)
269
+ api_path = '/backups/policies/{policyId}'
270
+ .gsub('{policyId}', policy_id)
271
+
272
+ if policy_id.nil?
273
+ raise Appwrite::Exception.new('Missing required parameter: "policyId"')
274
+ end
275
+
276
+ api_params = {
277
+ }
278
+
279
+ api_headers = {
280
+ "content-type": 'application/json',
281
+ }
282
+
283
+ @client.call(
284
+ method: 'DELETE',
285
+ path: api_path,
286
+ headers: api_headers,
287
+ params: api_params,
288
+ )
289
+ end
290
+
291
+ # Create and trigger a new restoration for a backup on a project.
292
+ #
293
+ # @param [String] archive_id Backup archive ID to restore
294
+ # @param [Array] services Array of services to restore
295
+ # @param [String] new_resource_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.
296
+ # @param [String] new_resource_name Database name. Max length: 128 chars.
297
+ #
298
+ # @return [BackupRestoration]
299
+ def create_restoration(archive_id:, services:, new_resource_id: nil, new_resource_name: nil)
300
+ api_path = '/backups/restoration'
301
+
302
+ if archive_id.nil?
303
+ raise Appwrite::Exception.new('Missing required parameter: "archiveId"')
304
+ end
305
+
306
+ if services.nil?
307
+ raise Appwrite::Exception.new('Missing required parameter: "services"')
308
+ end
309
+
310
+ api_params = {
311
+ archiveId: archive_id,
312
+ services: services,
313
+ newResourceId: new_resource_id,
314
+ newResourceName: new_resource_name,
315
+ }
316
+
317
+ api_headers = {
318
+ "content-type": 'application/json',
319
+ }
320
+
321
+ @client.call(
322
+ method: 'POST',
323
+ path: api_path,
324
+ headers: api_headers,
325
+ params: api_params,
326
+ response_type: Models::BackupRestoration
327
+ )
328
+ end
329
+
330
+ # List all backup restorations for a project.
331
+ #
332
+ # @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.
333
+ #
334
+ # @return [BackupRestorationList]
335
+ def list_restorations(queries: nil)
336
+ api_path = '/backups/restorations'
337
+
338
+ api_params = {
339
+ queries: queries,
340
+ }
341
+
342
+ api_headers = {
343
+ }
344
+
345
+ @client.call(
346
+ method: 'GET',
347
+ path: api_path,
348
+ headers: api_headers,
349
+ params: api_params,
350
+ response_type: Models::BackupRestorationList
351
+ )
352
+ end
353
+
354
+ # Get the current status of a backup restoration.
355
+ #
356
+ # @param [String] restoration_id Restoration ID. Choose a custom ID`. 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.
357
+ #
358
+ # @return [BackupRestoration]
359
+ def get_restoration(restoration_id:)
360
+ api_path = '/backups/restorations/{restorationId}'
361
+ .gsub('{restorationId}', restoration_id)
362
+
363
+ if restoration_id.nil?
364
+ raise Appwrite::Exception.new('Missing required parameter: "restorationId"')
365
+ end
366
+
367
+ api_params = {
368
+ }
369
+
370
+ api_headers = {
371
+ }
372
+
373
+ @client.call(
374
+ method: 'GET',
375
+ path: api_path,
376
+ headers: api_headers,
377
+ params: api_params,
378
+ response_type: Models::BackupRestoration
379
+ )
380
+ end
381
+
382
+ end
383
+ end
@@ -1556,9 +1556,10 @@ module Appwrite
1556
1556
  # @param [] required Is attribute required?
1557
1557
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
1558
1558
  # @param [] array Is attribute an array?
1559
+ # @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1559
1560
  #
1560
1561
  # @return [AttributeLongtext]
1561
- def create_longtext_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil)
1562
+ def create_longtext_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil, encrypt: nil)
1562
1563
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'
1563
1564
  .gsub('{databaseId}', database_id)
1564
1565
  .gsub('{collectionId}', collection_id)
@@ -1584,6 +1585,7 @@ module Appwrite
1584
1585
  required: required,
1585
1586
  default: default,
1586
1587
  array: array,
1588
+ encrypt: encrypt,
1587
1589
  }
1588
1590
 
1589
1591
  api_headers = {
@@ -1665,9 +1667,10 @@ module Appwrite
1665
1667
  # @param [] required Is attribute required?
1666
1668
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
1667
1669
  # @param [] array Is attribute an array?
1670
+ # @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1668
1671
  #
1669
1672
  # @return [AttributeMediumtext]
1670
- def create_mediumtext_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil)
1673
+ def create_mediumtext_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil, encrypt: nil)
1671
1674
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'
1672
1675
  .gsub('{databaseId}', database_id)
1673
1676
  .gsub('{collectionId}', collection_id)
@@ -1693,6 +1696,7 @@ module Appwrite
1693
1696
  required: required,
1694
1697
  default: default,
1695
1698
  array: array,
1699
+ encrypt: encrypt,
1696
1700
  }
1697
1701
 
1698
1702
  api_headers = {
@@ -2173,9 +2177,10 @@ module Appwrite
2173
2177
  # @param [] required Is attribute required?
2174
2178
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
2175
2179
  # @param [] array Is attribute an array?
2180
+ # @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
2176
2181
  #
2177
2182
  # @return [AttributeText]
2178
- def create_text_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil)
2183
+ def create_text_attribute(database_id:, collection_id:, key:, required:, default: nil, array: nil, encrypt: nil)
2179
2184
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text'
2180
2185
  .gsub('{databaseId}', database_id)
2181
2186
  .gsub('{collectionId}', collection_id)
@@ -2201,6 +2206,7 @@ module Appwrite
2201
2206
  required: required,
2202
2207
  default: default,
2203
2208
  array: array,
2209
+ encrypt: encrypt,
2204
2210
  }
2205
2211
 
2206
2212
  api_headers = {
@@ -2398,9 +2404,10 @@ module Appwrite
2398
2404
  # @param [] required Is attribute required?
2399
2405
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
2400
2406
  # @param [] array Is attribute an array?
2407
+ # @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
2401
2408
  #
2402
2409
  # @return [AttributeVarchar]
2403
- def create_varchar_attribute(database_id:, collection_id:, key:, size:, required:, default: nil, array: nil)
2410
+ def create_varchar_attribute(database_id:, collection_id:, key:, size:, required:, default: nil, array: nil, encrypt: nil)
2404
2411
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'
2405
2412
  .gsub('{databaseId}', database_id)
2406
2413
  .gsub('{collectionId}', collection_id)
@@ -2431,6 +2438,7 @@ module Appwrite
2431
2438
  required: required,
2432
2439
  default: default,
2433
2440
  array: array,
2441
+ encrypt: encrypt,
2434
2442
  }
2435
2443
 
2436
2444
  api_headers = {
@@ -167,6 +167,54 @@ module Appwrite
167
167
  )
168
168
  end
169
169
 
170
+ # Get billing project aggregation queue.
171
+ #
172
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
173
+ #
174
+ # @return [HealthQueue]
175
+ def get_queue_billing_project_aggregation(threshold: nil)
176
+ api_path = '/health/queue/billing-project-aggregation'
177
+
178
+ api_params = {
179
+ threshold: threshold,
180
+ }
181
+
182
+ api_headers = {
183
+ }
184
+
185
+ @client.call(
186
+ method: 'GET',
187
+ path: api_path,
188
+ headers: api_headers,
189
+ params: api_params,
190
+ response_type: Models::HealthQueue
191
+ )
192
+ end
193
+
194
+ # Get billing team aggregation queue.
195
+ #
196
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
197
+ #
198
+ # @return [HealthQueue]
199
+ def get_queue_billing_team_aggregation(threshold: nil)
200
+ api_path = '/health/queue/billing-team-aggregation'
201
+
202
+ api_params = {
203
+ threshold: threshold,
204
+ }
205
+
206
+ api_headers = {
207
+ }
208
+
209
+ @client.call(
210
+ method: 'GET',
211
+ path: api_path,
212
+ headers: api_headers,
213
+ params: api_params,
214
+ response_type: Models::HealthQueue
215
+ )
216
+ end
217
+
170
218
  # Get the number of builds that are waiting to be processed in the Appwrite
171
219
  # internal queue server.
172
220
  #
@@ -192,6 +240,30 @@ module Appwrite
192
240
  )
193
241
  end
194
242
 
243
+ # Get the priority builds queue size.
244
+ #
245
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 500.
246
+ #
247
+ # @return [HealthQueue]
248
+ def get_queue_priority_builds(threshold: nil)
249
+ api_path = '/health/queue/builds-priority'
250
+
251
+ api_params = {
252
+ threshold: threshold,
253
+ }
254
+
255
+ api_headers = {
256
+ }
257
+
258
+ @client.call(
259
+ method: 'GET',
260
+ path: api_path,
261
+ headers: api_headers,
262
+ params: api_params,
263
+ response_type: Models::HealthQueue
264
+ )
265
+ end
266
+
195
267
  # Get the number of certificates that are waiting to be issued against
196
268
  # [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
197
269
  # server.
@@ -426,6 +498,30 @@ module Appwrite
426
498
  )
427
499
  end
428
500
 
501
+ # Get region manager queue.
502
+ #
503
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.
504
+ #
505
+ # @return [HealthQueue]
506
+ def get_queue_region_manager(threshold: nil)
507
+ api_path = '/health/queue/region-manager'
508
+
509
+ api_params = {
510
+ threshold: threshold,
511
+ }
512
+
513
+ api_headers = {
514
+ }
515
+
516
+ @client.call(
517
+ method: 'GET',
518
+ path: api_path,
519
+ headers: api_headers,
520
+ params: api_params,
521
+ response_type: Models::HealthQueue
522
+ )
523
+ end
524
+
429
525
  # Get the number of metrics that are waiting to be processed in the Appwrite
430
526
  # stats resources queue.
431
527
  #
@@ -476,6 +572,30 @@ module Appwrite
476
572
  )
477
573
  end
478
574
 
575
+ # Get threats queue.
576
+ #
577
+ # @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.
578
+ #
579
+ # @return [HealthQueue]
580
+ def get_queue_threats(threshold: nil)
581
+ api_path = '/health/queue/threats'
582
+
583
+ api_params = {
584
+ threshold: threshold,
585
+ }
586
+
587
+ api_headers = {
588
+ }
589
+
590
+ @client.call(
591
+ method: 'GET',
592
+ path: api_path,
593
+ headers: api_headers,
594
+ params: api_params,
595
+ response_type: Models::HealthQueue
596
+ )
597
+ end
598
+
479
599
  # Get the number of webhooks that are waiting to be processed in the Appwrite
480
600
  # internal queue server.
481
601
  #