appwrite 19.1.0 → 19.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.
@@ -15,14 +15,16 @@ module Appwrite
15
15
  #
16
16
  # @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
17
17
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
18
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
18
19
  #
19
20
  # @return [DatabaseList]
20
- def list(queries: nil, search: nil)
21
+ def list(queries: nil, search: nil, total: nil)
21
22
  api_path = '/databases'
22
23
 
23
24
  api_params = {
24
25
  queries: queries,
25
26
  search: search,
27
+ total: total,
26
28
  }
27
29
 
28
30
  api_headers = {
@@ -78,6 +80,175 @@ module Appwrite
78
80
  )
79
81
  end
80
82
 
83
+ # List transactions across all databases.
84
+ #
85
+ # @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).
86
+ #
87
+ # @return [TransactionList]
88
+ def list_transactions(queries: nil)
89
+ api_path = '/databases/transactions'
90
+
91
+ api_params = {
92
+ queries: queries,
93
+ }
94
+
95
+ api_headers = {
96
+ }
97
+
98
+ @client.call(
99
+ method: 'GET',
100
+ path: api_path,
101
+ headers: api_headers,
102
+ params: api_params,
103
+ response_type: Models::TransactionList
104
+ )
105
+ end
106
+
107
+ # Create a new transaction.
108
+ #
109
+ # @param [Integer] ttl Seconds before the transaction expires.
110
+ #
111
+ # @return [Transaction]
112
+ def create_transaction(ttl: nil)
113
+ api_path = '/databases/transactions'
114
+
115
+ api_params = {
116
+ ttl: ttl,
117
+ }
118
+
119
+ api_headers = {
120
+ "content-type": 'application/json',
121
+ }
122
+
123
+ @client.call(
124
+ method: 'POST',
125
+ path: api_path,
126
+ headers: api_headers,
127
+ params: api_params,
128
+ response_type: Models::Transaction
129
+ )
130
+ end
131
+
132
+ # Get a transaction by its unique ID.
133
+ #
134
+ # @param [String] transaction_id Transaction ID.
135
+ #
136
+ # @return [Transaction]
137
+ def get_transaction(transaction_id:)
138
+ api_path = '/databases/transactions/{transactionId}'
139
+ .gsub('{transactionId}', transaction_id)
140
+
141
+ if transaction_id.nil?
142
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
143
+ end
144
+
145
+ api_params = {
146
+ }
147
+
148
+ api_headers = {
149
+ }
150
+
151
+ @client.call(
152
+ method: 'GET',
153
+ path: api_path,
154
+ headers: api_headers,
155
+ params: api_params,
156
+ response_type: Models::Transaction
157
+ )
158
+ end
159
+
160
+ # Update a transaction, to either commit or roll back its operations.
161
+ #
162
+ # @param [String] transaction_id Transaction ID.
163
+ # @param [] commit Commit transaction?
164
+ # @param [] rollback Rollback transaction?
165
+ #
166
+ # @return [Transaction]
167
+ def update_transaction(transaction_id:, commit: nil, rollback: nil)
168
+ api_path = '/databases/transactions/{transactionId}'
169
+ .gsub('{transactionId}', transaction_id)
170
+
171
+ if transaction_id.nil?
172
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
173
+ end
174
+
175
+ api_params = {
176
+ commit: commit,
177
+ rollback: rollback,
178
+ }
179
+
180
+ api_headers = {
181
+ "content-type": 'application/json',
182
+ }
183
+
184
+ @client.call(
185
+ method: 'PATCH',
186
+ path: api_path,
187
+ headers: api_headers,
188
+ params: api_params,
189
+ response_type: Models::Transaction
190
+ )
191
+ end
192
+
193
+ # Delete a transaction by its unique ID.
194
+ #
195
+ # @param [String] transaction_id Transaction ID.
196
+ #
197
+ # @return []
198
+ def delete_transaction(transaction_id:)
199
+ api_path = '/databases/transactions/{transactionId}'
200
+ .gsub('{transactionId}', transaction_id)
201
+
202
+ if transaction_id.nil?
203
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
204
+ end
205
+
206
+ api_params = {
207
+ }
208
+
209
+ api_headers = {
210
+ "content-type": 'application/json',
211
+ }
212
+
213
+ @client.call(
214
+ method: 'DELETE',
215
+ path: api_path,
216
+ headers: api_headers,
217
+ params: api_params,
218
+ )
219
+ end
220
+
221
+ # Create multiple operations in a single transaction.
222
+ #
223
+ # @param [String] transaction_id Transaction ID.
224
+ # @param [Array] operations Array of staged operations.
225
+ #
226
+ # @return [Transaction]
227
+ def create_operations(transaction_id:, operations: nil)
228
+ api_path = '/databases/transactions/{transactionId}/operations'
229
+ .gsub('{transactionId}', transaction_id)
230
+
231
+ if transaction_id.nil?
232
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
233
+ end
234
+
235
+ api_params = {
236
+ operations: operations,
237
+ }
238
+
239
+ api_headers = {
240
+ "content-type": 'application/json',
241
+ }
242
+
243
+ @client.call(
244
+ method: 'POST',
245
+ path: api_path,
246
+ headers: api_headers,
247
+ params: api_params,
248
+ response_type: Models::Transaction
249
+ )
250
+ end
251
+
81
252
  #
82
253
  # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.get` instead.
83
254
  #
@@ -191,9 +362,10 @@ module Appwrite
191
362
  # @param [String] database_id Database ID.
192
363
  # @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, enabled, documentSecurity
193
364
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
365
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
194
366
  #
195
367
  # @return [CollectionList]
196
- def list_collections(database_id:, queries: nil, search: nil)
368
+ def list_collections(database_id:, queries: nil, search: nil, total: nil)
197
369
  api_path = '/databases/{databaseId}/collections'
198
370
  .gsub('{databaseId}', database_id)
199
371
 
@@ -204,6 +376,7 @@ module Appwrite
204
376
  api_params = {
205
377
  queries: queries,
206
378
  search: search,
379
+ total: total,
207
380
  }
208
381
 
209
382
  api_headers = {
@@ -405,9 +578,10 @@ module Appwrite
405
578
  # @param [String] database_id Database ID.
406
579
  # @param [String] collection_id Collection ID.
407
580
  # @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: key, type, size, required, array, status, error
581
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
408
582
  #
409
583
  # @return [AttributeList]
410
- def list_attributes(database_id:, collection_id:, queries: nil)
584
+ def list_attributes(database_id:, collection_id:, queries: nil, total: nil)
411
585
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes'
412
586
  .gsub('{databaseId}', database_id)
413
587
  .gsub('{collectionId}', collection_id)
@@ -422,6 +596,7 @@ module Appwrite
422
596
 
423
597
  api_params = {
424
598
  queries: queries,
599
+ total: total,
425
600
  }
426
601
 
427
602
  api_headers = {
@@ -2034,9 +2209,11 @@ module Appwrite
2034
2209
  # @param [String] database_id Database ID.
2035
2210
  # @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).
2036
2211
  # @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.
2212
+ # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2213
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
2037
2214
  #
2038
2215
  # @return [DocumentList]
2039
- def list_documents(database_id:, collection_id:, queries: nil)
2216
+ def list_documents(database_id:, collection_id:, queries: nil, transaction_id: nil, total: nil)
2040
2217
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2041
2218
  .gsub('{databaseId}', database_id)
2042
2219
  .gsub('{collectionId}', collection_id)
@@ -2051,6 +2228,8 @@ module Appwrite
2051
2228
 
2052
2229
  api_params = {
2053
2230
  queries: queries,
2231
+ transactionId: transaction_id,
2232
+ total: total,
2054
2233
  }
2055
2234
 
2056
2235
  api_headers = {
@@ -2078,9 +2257,10 @@ module Appwrite
2078
2257
  # @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.
2079
2258
  # @param [Hash] data Document data as JSON object.
2080
2259
  # @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).
2260
+ # @param [String] transaction_id Transaction ID for staging the operation.
2081
2261
  #
2082
2262
  # @return [Document]
2083
- def create_document(database_id:, collection_id:, document_id:, data:, permissions: nil)
2263
+ def create_document(database_id:, collection_id:, document_id:, data:, permissions: nil, transaction_id: nil)
2084
2264
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2085
2265
  .gsub('{databaseId}', database_id)
2086
2266
  .gsub('{collectionId}', collection_id)
@@ -2105,6 +2285,7 @@ module Appwrite
2105
2285
  documentId: document_id,
2106
2286
  data: data,
2107
2287
  permissions: permissions,
2288
+ transactionId: transaction_id,
2108
2289
  }
2109
2290
 
2110
2291
  api_headers = {
@@ -2131,9 +2312,10 @@ module Appwrite
2131
2312
  # @param [String] database_id Database ID.
2132
2313
  # @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.
2133
2314
  # @param [Array] documents Array of documents data as JSON objects.
2315
+ # @param [String] transaction_id Transaction ID for staging the operation.
2134
2316
  #
2135
2317
  # @return [DocumentList]
2136
- def create_documents(database_id:, collection_id:, documents:)
2318
+ def create_documents(database_id:, collection_id:, documents:, transaction_id: nil)
2137
2319
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2138
2320
  .gsub('{databaseId}', database_id)
2139
2321
  .gsub('{collectionId}', collection_id)
@@ -2152,6 +2334,7 @@ module Appwrite
2152
2334
 
2153
2335
  api_params = {
2154
2336
  documents: documents,
2337
+ transactionId: transaction_id,
2155
2338
  }
2156
2339
 
2157
2340
  api_headers = {
@@ -2179,9 +2362,10 @@ module Appwrite
2179
2362
  # @param [String] database_id Database ID.
2180
2363
  # @param [String] collection_id Collection ID.
2181
2364
  # @param [Array] documents Array of document data as JSON objects. May contain partial documents.
2365
+ # @param [String] transaction_id Transaction ID for staging the operation.
2182
2366
  #
2183
2367
  # @return [DocumentList]
2184
- def upsert_documents(database_id:, collection_id:, documents:)
2368
+ def upsert_documents(database_id:, collection_id:, documents:, transaction_id: nil)
2185
2369
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2186
2370
  .gsub('{databaseId}', database_id)
2187
2371
  .gsub('{collectionId}', collection_id)
@@ -2200,6 +2384,7 @@ module Appwrite
2200
2384
 
2201
2385
  api_params = {
2202
2386
  documents: documents,
2387
+ transactionId: transaction_id,
2203
2388
  }
2204
2389
 
2205
2390
  api_headers = {
@@ -2226,9 +2411,10 @@ module Appwrite
2226
2411
  # @param [String] collection_id Collection ID.
2227
2412
  # @param [Hash] data Document data as JSON object. Include only attribute and value pairs to be updated.
2228
2413
  # @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.
2414
+ # @param [String] transaction_id Transaction ID for staging the operation.
2229
2415
  #
2230
2416
  # @return [DocumentList]
2231
- def update_documents(database_id:, collection_id:, data: nil, queries: nil)
2417
+ def update_documents(database_id:, collection_id:, data: nil, queries: nil, transaction_id: nil)
2232
2418
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2233
2419
  .gsub('{databaseId}', database_id)
2234
2420
  .gsub('{collectionId}', collection_id)
@@ -2244,6 +2430,7 @@ module Appwrite
2244
2430
  api_params = {
2245
2431
  data: data,
2246
2432
  queries: queries,
2433
+ transactionId: transaction_id,
2247
2434
  }
2248
2435
 
2249
2436
  api_headers = {
@@ -2268,9 +2455,10 @@ module Appwrite
2268
2455
  # @param [String] database_id Database ID.
2269
2456
  # @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).
2270
2457
  # @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.
2458
+ # @param [String] transaction_id Transaction ID for staging the operation.
2271
2459
  #
2272
2460
  # @return [DocumentList]
2273
- def delete_documents(database_id:, collection_id:, queries: nil)
2461
+ def delete_documents(database_id:, collection_id:, queries: nil, transaction_id: nil)
2274
2462
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
2275
2463
  .gsub('{databaseId}', database_id)
2276
2464
  .gsub('{collectionId}', collection_id)
@@ -2285,6 +2473,7 @@ module Appwrite
2285
2473
 
2286
2474
  api_params = {
2287
2475
  queries: queries,
2476
+ transactionId: transaction_id,
2288
2477
  }
2289
2478
 
2290
2479
  api_headers = {
@@ -2310,9 +2499,10 @@ module Appwrite
2310
2499
  # @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).
2311
2500
  # @param [String] document_id Document ID.
2312
2501
  # @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.
2502
+ # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2313
2503
  #
2314
2504
  # @return [Document]
2315
- def get_document(database_id:, collection_id:, document_id:, queries: nil)
2505
+ def get_document(database_id:, collection_id:, document_id:, queries: nil, transaction_id: nil)
2316
2506
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
2317
2507
  .gsub('{databaseId}', database_id)
2318
2508
  .gsub('{collectionId}', collection_id)
@@ -2332,6 +2522,7 @@ module Appwrite
2332
2522
 
2333
2523
  api_params = {
2334
2524
  queries: queries,
2525
+ transactionId: transaction_id,
2335
2526
  }
2336
2527
 
2337
2528
  api_headers = {
@@ -2359,9 +2550,10 @@ module Appwrite
2359
2550
  # @param [String] document_id Document ID.
2360
2551
  # @param [Hash] data Document data as JSON object. Include all required attributes of the document to be created or updated.
2361
2552
  # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
2553
+ # @param [String] transaction_id Transaction ID for staging the operation.
2362
2554
  #
2363
2555
  # @return [Document]
2364
- def upsert_document(database_id:, collection_id:, document_id:, data:, permissions: nil)
2556
+ def upsert_document(database_id:, collection_id:, document_id:, data:, permissions: nil, transaction_id: nil)
2365
2557
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
2366
2558
  .gsub('{databaseId}', database_id)
2367
2559
  .gsub('{collectionId}', collection_id)
@@ -2386,6 +2578,7 @@ module Appwrite
2386
2578
  api_params = {
2387
2579
  data: data,
2388
2580
  permissions: permissions,
2581
+ transactionId: transaction_id,
2389
2582
  }
2390
2583
 
2391
2584
  api_headers = {
@@ -2412,9 +2605,10 @@ module Appwrite
2412
2605
  # @param [String] document_id Document ID.
2413
2606
  # @param [Hash] data Document data as JSON object. Include only attribute and value pairs to be updated.
2414
2607
  # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
2608
+ # @param [String] transaction_id Transaction ID for staging the operation.
2415
2609
  #
2416
2610
  # @return [Document]
2417
- def update_document(database_id:, collection_id:, document_id:, data: nil, permissions: nil)
2611
+ def update_document(database_id:, collection_id:, document_id:, data: nil, permissions: nil, transaction_id: nil)
2418
2612
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
2419
2613
  .gsub('{databaseId}', database_id)
2420
2614
  .gsub('{collectionId}', collection_id)
@@ -2435,6 +2629,7 @@ module Appwrite
2435
2629
  api_params = {
2436
2630
  data: data,
2437
2631
  permissions: permissions,
2632
+ transactionId: transaction_id,
2438
2633
  }
2439
2634
 
2440
2635
  api_headers = {
@@ -2458,9 +2653,10 @@ module Appwrite
2458
2653
  # @param [String] database_id Database ID.
2459
2654
  # @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).
2460
2655
  # @param [String] document_id Document ID.
2656
+ # @param [String] transaction_id Transaction ID for staging the operation.
2461
2657
  #
2462
2658
  # @return []
2463
- def delete_document(database_id:, collection_id:, document_id:)
2659
+ def delete_document(database_id:, collection_id:, document_id:, transaction_id: nil)
2464
2660
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
2465
2661
  .gsub('{databaseId}', database_id)
2466
2662
  .gsub('{collectionId}', collection_id)
@@ -2479,6 +2675,7 @@ module Appwrite
2479
2675
  end
2480
2676
 
2481
2677
  api_params = {
2678
+ transactionId: transaction_id,
2482
2679
  }
2483
2680
 
2484
2681
  api_headers = {
@@ -2504,9 +2701,10 @@ module Appwrite
2504
2701
  # @param [String] attribute Attribute key.
2505
2702
  # @param [Float] value Value to increment the attribute by. The value must be a number.
2506
2703
  # @param [Float] min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
2704
+ # @param [String] transaction_id Transaction ID for staging the operation.
2507
2705
  #
2508
2706
  # @return [Document]
2509
- def decrement_document_attribute(database_id:, collection_id:, document_id:, attribute:, value: nil, min: nil)
2707
+ def decrement_document_attribute(database_id:, collection_id:, document_id:, attribute:, value: nil, min: nil, transaction_id: nil)
2510
2708
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'
2511
2709
  .gsub('{databaseId}', database_id)
2512
2710
  .gsub('{collectionId}', collection_id)
@@ -2532,6 +2730,7 @@ module Appwrite
2532
2730
  api_params = {
2533
2731
  value: value,
2534
2732
  min: min,
2733
+ transactionId: transaction_id,
2535
2734
  }
2536
2735
 
2537
2736
  api_headers = {
@@ -2558,9 +2757,10 @@ module Appwrite
2558
2757
  # @param [String] attribute Attribute key.
2559
2758
  # @param [Float] value Value to increment the attribute by. The value must be a number.
2560
2759
  # @param [Float] max Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
2760
+ # @param [String] transaction_id Transaction ID for staging the operation.
2561
2761
  #
2562
2762
  # @return [Document]
2563
- def increment_document_attribute(database_id:, collection_id:, document_id:, attribute:, value: nil, max: nil)
2763
+ def increment_document_attribute(database_id:, collection_id:, document_id:, attribute:, value: nil, max: nil, transaction_id: nil)
2564
2764
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'
2565
2765
  .gsub('{databaseId}', database_id)
2566
2766
  .gsub('{collectionId}', collection_id)
@@ -2586,6 +2786,7 @@ module Appwrite
2586
2786
  api_params = {
2587
2787
  value: value,
2588
2788
  max: max,
2789
+ transactionId: transaction_id,
2589
2790
  }
2590
2791
 
2591
2792
  api_headers = {
@@ -2609,9 +2810,10 @@ module Appwrite
2609
2810
  # @param [String] database_id Database ID.
2610
2811
  # @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).
2611
2812
  # @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: key, type, status, attributes, error
2813
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
2612
2814
  #
2613
2815
  # @return [IndexList]
2614
- def list_indexes(database_id:, collection_id:, queries: nil)
2816
+ def list_indexes(database_id:, collection_id:, queries: nil, total: nil)
2615
2817
  api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
2616
2818
  .gsub('{databaseId}', database_id)
2617
2819
  .gsub('{collectionId}', collection_id)
@@ -2626,6 +2828,7 @@ module Appwrite
2626
2828
 
2627
2829
  api_params = {
2628
2830
  queries: queries,
2831
+ total: total,
2629
2832
  }
2630
2833
 
2631
2834
  api_headers = {
@@ -2705,7 +2908,7 @@ module Appwrite
2705
2908
  #
2706
2909
  # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.
2707
2910
  #
2708
- # Get index by ID.
2911
+ # Get an index by its unique ID.
2709
2912
  #
2710
2913
  # @param [String] database_id Database ID.
2711
2914
  # @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).
@@ -12,14 +12,16 @@ module Appwrite
12
12
  #
13
13
  # @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, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
14
14
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
15
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
15
16
  #
16
17
  # @return [FunctionList]
17
- def list(queries: nil, search: nil)
18
+ def list(queries: nil, search: nil, total: nil)
18
19
  api_path = '/functions'
19
20
 
20
21
  api_params = {
21
22
  queries: queries,
22
23
  search: search,
24
+ total: total,
23
25
  }
24
26
 
25
27
  api_headers = {
@@ -317,9 +319,10 @@ module Appwrite
317
319
  # @param [String] function_id Function ID.
318
320
  # @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: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
319
321
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
322
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
320
323
  #
321
324
  # @return [DeploymentList]
322
- def list_deployments(function_id:, queries: nil, search: nil)
325
+ def list_deployments(function_id:, queries: nil, search: nil, total: nil)
323
326
  api_path = '/functions/{functionId}/deployments'
324
327
  .gsub('{functionId}', function_id)
325
328
 
@@ -330,6 +333,7 @@ module Appwrite
330
333
  api_params = {
331
334
  queries: queries,
332
335
  search: search,
336
+ total: total,
333
337
  }
334
338
 
335
339
  api_headers = {
@@ -697,9 +701,10 @@ module Appwrite
697
701
  #
698
702
  # @param [String] function_id Function ID.
699
703
  # @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: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
704
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
700
705
  #
701
706
  # @return [ExecutionList]
702
- def list_executions(function_id:, queries: nil)
707
+ def list_executions(function_id:, queries: nil, total: nil)
703
708
  api_path = '/functions/{functionId}/executions'
704
709
  .gsub('{functionId}', function_id)
705
710
 
@@ -709,6 +714,7 @@ module Appwrite
709
714
 
710
715
  api_params = {
711
716
  queries: queries,
717
+ total: total,
712
718
  }
713
719
 
714
720
  api_headers = {