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.
@@ -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 columns: name
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 [DatabaseList]
17
- def list(queries: nil, search: nil)
18
+ def list(queries: nil, search: nil, total: nil)
18
19
  api_path = '/tablesdb'
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 = {
@@ -72,6 +74,175 @@ module Appwrite
72
74
  )
73
75
  end
74
76
 
77
+ # List transactions across all databases.
78
+ #
79
+ # @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).
80
+ #
81
+ # @return [TransactionList]
82
+ def list_transactions(queries: nil)
83
+ api_path = '/tablesdb/transactions'
84
+
85
+ api_params = {
86
+ queries: queries,
87
+ }
88
+
89
+ api_headers = {
90
+ }
91
+
92
+ @client.call(
93
+ method: 'GET',
94
+ path: api_path,
95
+ headers: api_headers,
96
+ params: api_params,
97
+ response_type: Models::TransactionList
98
+ )
99
+ end
100
+
101
+ # Create a new transaction.
102
+ #
103
+ # @param [Integer] ttl Seconds before the transaction expires.
104
+ #
105
+ # @return [Transaction]
106
+ def create_transaction(ttl: nil)
107
+ api_path = '/tablesdb/transactions'
108
+
109
+ api_params = {
110
+ ttl: ttl,
111
+ }
112
+
113
+ api_headers = {
114
+ "content-type": 'application/json',
115
+ }
116
+
117
+ @client.call(
118
+ method: 'POST',
119
+ path: api_path,
120
+ headers: api_headers,
121
+ params: api_params,
122
+ response_type: Models::Transaction
123
+ )
124
+ end
125
+
126
+ # Get a transaction by its unique ID.
127
+ #
128
+ # @param [String] transaction_id Transaction ID.
129
+ #
130
+ # @return [Transaction]
131
+ def get_transaction(transaction_id:)
132
+ api_path = '/tablesdb/transactions/{transactionId}'
133
+ .gsub('{transactionId}', transaction_id)
134
+
135
+ if transaction_id.nil?
136
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
137
+ end
138
+
139
+ api_params = {
140
+ }
141
+
142
+ api_headers = {
143
+ }
144
+
145
+ @client.call(
146
+ method: 'GET',
147
+ path: api_path,
148
+ headers: api_headers,
149
+ params: api_params,
150
+ response_type: Models::Transaction
151
+ )
152
+ end
153
+
154
+ # Update a transaction, to either commit or roll back its operations.
155
+ #
156
+ # @param [String] transaction_id Transaction ID.
157
+ # @param [] commit Commit transaction?
158
+ # @param [] rollback Rollback transaction?
159
+ #
160
+ # @return [Transaction]
161
+ def update_transaction(transaction_id:, commit: nil, rollback: nil)
162
+ api_path = '/tablesdb/transactions/{transactionId}'
163
+ .gsub('{transactionId}', transaction_id)
164
+
165
+ if transaction_id.nil?
166
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
167
+ end
168
+
169
+ api_params = {
170
+ commit: commit,
171
+ rollback: rollback,
172
+ }
173
+
174
+ api_headers = {
175
+ "content-type": 'application/json',
176
+ }
177
+
178
+ @client.call(
179
+ method: 'PATCH',
180
+ path: api_path,
181
+ headers: api_headers,
182
+ params: api_params,
183
+ response_type: Models::Transaction
184
+ )
185
+ end
186
+
187
+ # Delete a transaction by its unique ID.
188
+ #
189
+ # @param [String] transaction_id Transaction ID.
190
+ #
191
+ # @return []
192
+ def delete_transaction(transaction_id:)
193
+ api_path = '/tablesdb/transactions/{transactionId}'
194
+ .gsub('{transactionId}', transaction_id)
195
+
196
+ if transaction_id.nil?
197
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
198
+ end
199
+
200
+ api_params = {
201
+ }
202
+
203
+ api_headers = {
204
+ "content-type": 'application/json',
205
+ }
206
+
207
+ @client.call(
208
+ method: 'DELETE',
209
+ path: api_path,
210
+ headers: api_headers,
211
+ params: api_params,
212
+ )
213
+ end
214
+
215
+ # Create multiple operations in a single transaction.
216
+ #
217
+ # @param [String] transaction_id Transaction ID.
218
+ # @param [Array] operations Array of staged operations.
219
+ #
220
+ # @return [Transaction]
221
+ def create_operations(transaction_id:, operations: nil)
222
+ api_path = '/tablesdb/transactions/{transactionId}/operations'
223
+ .gsub('{transactionId}', transaction_id)
224
+
225
+ if transaction_id.nil?
226
+ raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
227
+ end
228
+
229
+ api_params = {
230
+ operations: operations,
231
+ }
232
+
233
+ api_headers = {
234
+ "content-type": 'application/json',
235
+ }
236
+
237
+ @client.call(
238
+ method: 'POST',
239
+ path: api_path,
240
+ headers: api_headers,
241
+ params: api_params,
242
+ response_type: Models::Transaction
243
+ )
244
+ end
245
+
75
246
  # Get a database by its unique ID. This endpoint response returns a JSON
76
247
  # object with the database metadata.
77
248
  #
@@ -173,9 +344,10 @@ module Appwrite
173
344
  # @param [String] database_id Database ID.
174
345
  # @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 columns: name, enabled, rowSecurity
175
346
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
347
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
176
348
  #
177
349
  # @return [TableList]
178
- def list_tables(database_id:, queries: nil, search: nil)
350
+ def list_tables(database_id:, queries: nil, search: nil, total: nil)
179
351
  api_path = '/tablesdb/{databaseId}/tables'
180
352
  .gsub('{databaseId}', database_id)
181
353
 
@@ -186,6 +358,7 @@ module Appwrite
186
358
  api_params = {
187
359
  queries: queries,
188
360
  search: search,
361
+ total: total,
189
362
  }
190
363
 
191
364
  api_headers = {
@@ -372,9 +545,10 @@ module Appwrite
372
545
  # @param [String] database_id Database ID.
373
546
  # @param [String] table_id Table ID.
374
547
  # @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 columns: key, type, size, required, array, status, error
548
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
375
549
  #
376
550
  # @return [ColumnList]
377
- def list_columns(database_id:, table_id:, queries: nil)
551
+ def list_columns(database_id:, table_id:, queries: nil, total: nil)
378
552
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns'
379
553
  .gsub('{databaseId}', database_id)
380
554
  .gsub('{tableId}', table_id)
@@ -389,6 +563,7 @@ module Appwrite
389
563
 
390
564
  api_params = {
391
565
  queries: queries,
566
+ total: total,
392
567
  }
393
568
 
394
569
  api_headers = {
@@ -1912,9 +2087,10 @@ module Appwrite
1912
2087
  # @param [String] database_id Database ID.
1913
2088
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1914
2089
  # @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 columns: key, type, status, attributes, error
2090
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1915
2091
  #
1916
2092
  # @return [ColumnIndexList]
1917
- def list_indexes(database_id:, table_id:, queries: nil)
2093
+ def list_indexes(database_id:, table_id:, queries: nil, total: nil)
1918
2094
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/indexes'
1919
2095
  .gsub('{databaseId}', database_id)
1920
2096
  .gsub('{tableId}', table_id)
@@ -1929,6 +2105,7 @@ module Appwrite
1929
2105
 
1930
2106
  api_params = {
1931
2107
  queries: queries,
2108
+ total: total,
1932
2109
  }
1933
2110
 
1934
2111
  api_headers = {
@@ -2088,9 +2265,11 @@ module Appwrite
2088
2265
  # @param [String] database_id Database ID.
2089
2266
  # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
2090
2267
  # @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.
2268
+ # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2269
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
2091
2270
  #
2092
2271
  # @return [RowList]
2093
- def list_rows(database_id:, table_id:, queries: nil)
2272
+ def list_rows(database_id:, table_id:, queries: nil, transaction_id: nil, total: nil)
2094
2273
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2095
2274
  .gsub('{databaseId}', database_id)
2096
2275
  .gsub('{tableId}', table_id)
@@ -2105,6 +2284,8 @@ module Appwrite
2105
2284
 
2106
2285
  api_params = {
2107
2286
  queries: queries,
2287
+ transactionId: transaction_id,
2288
+ total: total,
2108
2289
  }
2109
2290
 
2110
2291
  api_headers = {
@@ -2129,9 +2310,10 @@ module Appwrite
2129
2310
  # @param [String] row_id Row 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.
2130
2311
  # @param [Hash] data Row data as JSON object.
2131
2312
  # @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).
2313
+ # @param [String] transaction_id Transaction ID for staging the operation.
2132
2314
  #
2133
2315
  # @return [Row]
2134
- def create_row(database_id:, table_id:, row_id:, data:, permissions: nil)
2316
+ def create_row(database_id:, table_id:, row_id:, data:, permissions: nil, transaction_id: nil)
2135
2317
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2136
2318
  .gsub('{databaseId}', database_id)
2137
2319
  .gsub('{tableId}', table_id)
@@ -2156,6 +2338,7 @@ module Appwrite
2156
2338
  rowId: row_id,
2157
2339
  data: data,
2158
2340
  permissions: permissions,
2341
+ transactionId: transaction_id,
2159
2342
  }
2160
2343
 
2161
2344
  api_headers = {
@@ -2179,9 +2362,10 @@ module Appwrite
2179
2362
  # @param [String] database_id Database ID.
2180
2363
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.
2181
2364
  # @param [Array] rows Array of rows data as JSON objects.
2365
+ # @param [String] transaction_id Transaction ID for staging the operation.
2182
2366
  #
2183
2367
  # @return [RowList]
2184
- def create_rows(database_id:, table_id:, rows:)
2368
+ def create_rows(database_id:, table_id:, rows:, transaction_id: nil)
2185
2369
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2186
2370
  .gsub('{databaseId}', database_id)
2187
2371
  .gsub('{tableId}', table_id)
@@ -2200,6 +2384,7 @@ module Appwrite
2200
2384
 
2201
2385
  api_params = {
2202
2386
  rows: rows,
2387
+ transactionId: transaction_id,
2203
2388
  }
2204
2389
 
2205
2390
  api_headers = {
@@ -2224,9 +2409,10 @@ module Appwrite
2224
2409
  # @param [String] database_id Database ID.
2225
2410
  # @param [String] table_id Table ID.
2226
2411
  # @param [Array] rows Array of row data as JSON objects. May contain partial rows.
2412
+ # @param [String] transaction_id Transaction ID for staging the operation.
2227
2413
  #
2228
2414
  # @return [RowList]
2229
- def upsert_rows(database_id:, table_id:, rows:)
2415
+ def upsert_rows(database_id:, table_id:, rows:, transaction_id: nil)
2230
2416
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2231
2417
  .gsub('{databaseId}', database_id)
2232
2418
  .gsub('{tableId}', table_id)
@@ -2245,6 +2431,7 @@ module Appwrite
2245
2431
 
2246
2432
  api_params = {
2247
2433
  rows: rows,
2434
+ transactionId: transaction_id,
2248
2435
  }
2249
2436
 
2250
2437
  api_headers = {
@@ -2267,9 +2454,10 @@ module Appwrite
2267
2454
  # @param [String] table_id Table ID.
2268
2455
  # @param [Hash] data Row data as JSON object. Include only column and value pairs to be updated.
2269
2456
  # @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.
2457
+ # @param [String] transaction_id Transaction ID for staging the operation.
2270
2458
  #
2271
2459
  # @return [RowList]
2272
- def update_rows(database_id:, table_id:, data: nil, queries: nil)
2460
+ def update_rows(database_id:, table_id:, data: nil, queries: nil, transaction_id: nil)
2273
2461
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2274
2462
  .gsub('{databaseId}', database_id)
2275
2463
  .gsub('{tableId}', table_id)
@@ -2285,6 +2473,7 @@ module Appwrite
2285
2473
  api_params = {
2286
2474
  data: data,
2287
2475
  queries: queries,
2476
+ transactionId: transaction_id,
2288
2477
  }
2289
2478
 
2290
2479
  api_headers = {
@@ -2306,9 +2495,10 @@ module Appwrite
2306
2495
  # @param [String] database_id Database ID.
2307
2496
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
2308
2497
  # @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.
2498
+ # @param [String] transaction_id Transaction ID for staging the operation.
2309
2499
  #
2310
2500
  # @return [RowList]
2311
- def delete_rows(database_id:, table_id:, queries: nil)
2501
+ def delete_rows(database_id:, table_id:, queries: nil, transaction_id: nil)
2312
2502
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows'
2313
2503
  .gsub('{databaseId}', database_id)
2314
2504
  .gsub('{tableId}', table_id)
@@ -2323,6 +2513,7 @@ module Appwrite
2323
2513
 
2324
2514
  api_params = {
2325
2515
  queries: queries,
2516
+ transactionId: transaction_id,
2326
2517
  }
2327
2518
 
2328
2519
  api_headers = {
@@ -2345,9 +2536,10 @@ module Appwrite
2345
2536
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
2346
2537
  # @param [String] row_id Row ID.
2347
2538
  # @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.
2539
+ # @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
2348
2540
  #
2349
2541
  # @return [Row]
2350
- def get_row(database_id:, table_id:, row_id:, queries: nil)
2542
+ def get_row(database_id:, table_id:, row_id:, queries: nil, transaction_id: nil)
2351
2543
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
2352
2544
  .gsub('{databaseId}', database_id)
2353
2545
  .gsub('{tableId}', table_id)
@@ -2367,6 +2559,7 @@ module Appwrite
2367
2559
 
2368
2560
  api_params = {
2369
2561
  queries: queries,
2562
+ transactionId: transaction_id,
2370
2563
  }
2371
2564
 
2372
2565
  api_headers = {
@@ -2391,9 +2584,10 @@ module Appwrite
2391
2584
  # @param [String] row_id Row ID.
2392
2585
  # @param [Hash] data Row data as JSON object. Include all required columns of the row to be created or updated.
2393
2586
  # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
2587
+ # @param [String] transaction_id Transaction ID for staging the operation.
2394
2588
  #
2395
2589
  # @return [Row]
2396
- def upsert_row(database_id:, table_id:, row_id:, data: nil, permissions: nil)
2590
+ def upsert_row(database_id:, table_id:, row_id:, data: nil, permissions: nil, transaction_id: nil)
2397
2591
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
2398
2592
  .gsub('{databaseId}', database_id)
2399
2593
  .gsub('{tableId}', table_id)
@@ -2414,6 +2608,7 @@ module Appwrite
2414
2608
  api_params = {
2415
2609
  data: data,
2416
2610
  permissions: permissions,
2611
+ transactionId: transaction_id,
2417
2612
  }
2418
2613
 
2419
2614
  api_headers = {
@@ -2437,9 +2632,10 @@ module Appwrite
2437
2632
  # @param [String] row_id Row ID.
2438
2633
  # @param [Hash] data Row data as JSON object. Include only columns and value pairs to be updated.
2439
2634
  # @param [Array] permissions An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
2635
+ # @param [String] transaction_id Transaction ID for staging the operation.
2440
2636
  #
2441
2637
  # @return [Row]
2442
- def update_row(database_id:, table_id:, row_id:, data: nil, permissions: nil)
2638
+ def update_row(database_id:, table_id:, row_id:, data: nil, permissions: nil, transaction_id: nil)
2443
2639
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
2444
2640
  .gsub('{databaseId}', database_id)
2445
2641
  .gsub('{tableId}', table_id)
@@ -2460,6 +2656,7 @@ module Appwrite
2460
2656
  api_params = {
2461
2657
  data: data,
2462
2658
  permissions: permissions,
2659
+ transactionId: transaction_id,
2463
2660
  }
2464
2661
 
2465
2662
  api_headers = {
@@ -2480,9 +2677,10 @@ module Appwrite
2480
2677
  # @param [String] database_id Database ID.
2481
2678
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
2482
2679
  # @param [String] row_id Row ID.
2680
+ # @param [String] transaction_id Transaction ID for staging the operation.
2483
2681
  #
2484
2682
  # @return []
2485
- def delete_row(database_id:, table_id:, row_id:)
2683
+ def delete_row(database_id:, table_id:, row_id:, transaction_id: nil)
2486
2684
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}'
2487
2685
  .gsub('{databaseId}', database_id)
2488
2686
  .gsub('{tableId}', table_id)
@@ -2501,6 +2699,7 @@ module Appwrite
2501
2699
  end
2502
2700
 
2503
2701
  api_params = {
2702
+ transactionId: transaction_id,
2504
2703
  }
2505
2704
 
2506
2705
  api_headers = {
@@ -2523,9 +2722,10 @@ module Appwrite
2523
2722
  # @param [String] column Column key.
2524
2723
  # @param [Float] value Value to increment the column by. The value must be a number.
2525
2724
  # @param [Float] min Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.
2725
+ # @param [String] transaction_id Transaction ID for staging the operation.
2526
2726
  #
2527
2727
  # @return [Row]
2528
- def decrement_row_column(database_id:, table_id:, row_id:, column:, value: nil, min: nil)
2728
+ def decrement_row_column(database_id:, table_id:, row_id:, column:, value: nil, min: nil, transaction_id: nil)
2529
2729
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement'
2530
2730
  .gsub('{databaseId}', database_id)
2531
2731
  .gsub('{tableId}', table_id)
@@ -2551,6 +2751,7 @@ module Appwrite
2551
2751
  api_params = {
2552
2752
  value: value,
2553
2753
  min: min,
2754
+ transactionId: transaction_id,
2554
2755
  }
2555
2756
 
2556
2757
  api_headers = {
@@ -2574,9 +2775,10 @@ module Appwrite
2574
2775
  # @param [String] column Column key.
2575
2776
  # @param [Float] value Value to increment the column by. The value must be a number.
2576
2777
  # @param [Float] max Maximum value for the column. If the current value is greater than this value, an error will be thrown.
2778
+ # @param [String] transaction_id Transaction ID for staging the operation.
2577
2779
  #
2578
2780
  # @return [Row]
2579
- def increment_row_column(database_id:, table_id:, row_id:, column:, value: nil, max: nil)
2781
+ def increment_row_column(database_id:, table_id:, row_id:, column:, value: nil, max: nil, transaction_id: nil)
2580
2782
  api_path = '/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment'
2581
2783
  .gsub('{databaseId}', database_id)
2582
2784
  .gsub('{tableId}', table_id)
@@ -2602,6 +2804,7 @@ module Appwrite
2602
2804
  api_params = {
2603
2805
  value: value,
2604
2806
  max: max,
2807
+ transactionId: transaction_id,
2605
2808
  }
2606
2809
 
2607
2810
  api_headers = {
@@ -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, total, billingPlan
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 [TeamList]
17
- def list(queries: nil, search: nil)
18
+ def list(queries: nil, search: nil, total: nil)
18
19
  api_path = '/teams'
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 = {
@@ -172,9 +174,10 @@ module Appwrite
172
174
  # @param [String] team_id Team ID.
173
175
  # @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: userId, teamId, invited, joined, confirm, roles
174
176
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
177
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
175
178
  #
176
179
  # @return [MembershipList]
177
- def list_memberships(team_id:, queries: nil, search: nil)
180
+ def list_memberships(team_id:, queries: nil, search: nil, total: nil)
178
181
  api_path = '/teams/{teamId}/memberships'
179
182
  .gsub('{teamId}', team_id)
180
183
 
@@ -185,6 +188,7 @@ module Appwrite
185
188
  api_params = {
186
189
  queries: queries,
187
190
  search: search,
191
+ total: total,
188
192
  }
189
193
 
190
194
  api_headers = {
@@ -13,9 +13,10 @@ module Appwrite
13
13
  # @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).
14
14
  # @param [String] file_id File unique ID.
15
15
  # @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: expire
16
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
16
17
  #
17
18
  # @return [ResourceTokenList]
18
- def list(bucket_id:, file_id:, queries: nil)
19
+ def list(bucket_id:, file_id:, queries: nil, total: nil)
19
20
  api_path = '/tokens/buckets/{bucketId}/files/{fileId}'
20
21
  .gsub('{bucketId}', bucket_id)
21
22
  .gsub('{fileId}', file_id)
@@ -30,6 +31,7 @@ module Appwrite
30
31
 
31
32
  api_params = {
32
33
  queries: queries,
34
+ total: total,
33
35
  }
34
36
 
35
37
  api_headers = {
@@ -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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels
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 [UserList]
17
- def list(queries: nil, search: nil)
18
+ def list(queries: nil, search: nil, total: nil)
18
19
  api_path = '/users'
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 = {
@@ -167,14 +169,16 @@ module Appwrite
167
169
  #
168
170
  # @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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
169
171
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
172
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
170
173
  #
171
174
  # @return [IdentityList]
172
- def list_identities(queries: nil, search: nil)
175
+ def list_identities(queries: nil, search: nil, total: nil)
173
176
  api_path = '/users/identities'
174
177
 
175
178
  api_params = {
176
179
  queries: queries,
177
180
  search: search,
181
+ total: total,
178
182
  }
179
183
 
180
184
  api_headers = {
@@ -673,9 +677,10 @@ module Appwrite
673
677
  #
674
678
  # @param [String] user_id User ID.
675
679
  # @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). Only supported methods are limit and offset
680
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
676
681
  #
677
682
  # @return [LogList]
678
- def list_logs(user_id:, queries: nil)
683
+ def list_logs(user_id:, queries: nil, total: nil)
679
684
  api_path = '/users/{userId}/logs'
680
685
  .gsub('{userId}', user_id)
681
686
 
@@ -685,6 +690,7 @@ module Appwrite
685
690
 
686
691
  api_params = {
687
692
  queries: queries,
693
+ total: total,
688
694
  }
689
695
 
690
696
  api_headers = {
@@ -704,9 +710,10 @@ module Appwrite
704
710
  # @param [String] user_id User ID.
705
711
  # @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: userId, teamId, invited, joined, confirm, roles
706
712
  # @param [String] search Search term to filter your list results. Max length: 256 chars.
713
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
707
714
  #
708
715
  # @return [MembershipList]
709
- def list_memberships(user_id:, queries: nil, search: nil)
716
+ def list_memberships(user_id:, queries: nil, search: nil, total: nil)
710
717
  api_path = '/users/{userId}/memberships'
711
718
  .gsub('{userId}', user_id)
712
719
 
@@ -717,6 +724,7 @@ module Appwrite
717
724
  api_params = {
718
725
  queries: queries,
719
726
  search: search,
727
+ total: total,
720
728
  }
721
729
 
722
730
  api_headers = {
@@ -1096,9 +1104,10 @@ module Appwrite
1096
1104
  # Get the user sessions list by its unique ID.
1097
1105
  #
1098
1106
  # @param [String] user_id User ID.
1107
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1099
1108
  #
1100
1109
  # @return [SessionList]
1101
- def list_sessions(user_id:)
1110
+ def list_sessions(user_id:, total: nil)
1102
1111
  api_path = '/users/{userId}/sessions'
1103
1112
  .gsub('{userId}', user_id)
1104
1113
 
@@ -1107,6 +1116,7 @@ module Appwrite
1107
1116
  end
1108
1117
 
1109
1118
  api_params = {
1119
+ total: total,
1110
1120
  }
1111
1121
 
1112
1122
  api_headers = {
@@ -1257,9 +1267,10 @@ module Appwrite
1257
1267
  #
1258
1268
  # @param [String] user_id User ID.
1259
1269
  # @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: userId, providerId, identifier, providerType
1270
+ # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
1260
1271
  #
1261
1272
  # @return [TargetList]
1262
- def list_targets(user_id:, queries: nil)
1273
+ def list_targets(user_id:, queries: nil, total: nil)
1263
1274
  api_path = '/users/{userId}/targets'
1264
1275
  .gsub('{userId}', user_id)
1265
1276
 
@@ -1269,6 +1280,7 @@ module Appwrite
1269
1280
 
1270
1281
  api_params = {
1271
1282
  queries: queries,
1283
+ total: total,
1272
1284
  }
1273
1285
 
1274
1286
  api_headers = {