@@ -59,7 +59,7 @@ class Database extends Service {
59
59
/// object with the collection metadata.
60
60
///
61
61
Future <models.Collection > getCollection ({required String collectionId}) async {
62
- final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
62
+ final String path = '/database/collections/{collectionId}' .replaceAll ('{collectionId}' , collectionId);
63
63
64
64
final Map <String , dynamic > params = {
65
65
};
@@ -77,7 +77,7 @@ class Database extends Service {
77
77
/// Update a collection by its unique ID.
78
78
///
79
79
Future <models.Collection > updateCollection ({required String collectionId, required String name, required String permission, List ? read, List ? write, bool ? enabled}) async {
80
- final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
80
+ final String path = '/database/collections/{collectionId}' .replaceAll ('{collectionId}' , collectionId);
81
81
82
82
final Map <String , dynamic > params = {
83
83
'name' : name,
@@ -101,7 +101,7 @@ class Database extends Service {
101
101
/// have access to delete this resource.
102
102
///
103
103
Future deleteCollection ({required String collectionId}) async {
104
- final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
104
+ final String path = '/database/collections/{collectionId}' .replaceAll ('{collectionId}' , collectionId);
105
105
106
106
final Map <String , dynamic > params = {
107
107
};
@@ -116,7 +116,7 @@ class Database extends Service {
116
116
117
117
/// List Attributes
118
118
Future <models.AttributeList > listAttributes ({required String collectionId}) async {
119
- final String path = '/database/collections/{collectionId}/attributes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
119
+ final String path = '/database/collections/{collectionId}/attributes' .replaceAll ('{collectionId}' , collectionId);
120
120
121
121
final Map <String , dynamic > params = {
122
122
};
@@ -135,7 +135,7 @@ class Database extends Service {
135
135
///
136
136
///
137
137
Future <models.AttributeBoolean > createBooleanAttribute ({required String collectionId, required String key, required bool xrequired, bool ? xdefault, bool ? array}) async {
138
- final String path = '/database/collections/{collectionId}/attributes/boolean' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
138
+ final String path = '/database/collections/{collectionId}/attributes/boolean' .replaceAll ('{collectionId}' , collectionId);
139
139
140
140
final Map <String , dynamic > params = {
141
141
'key' : key,
@@ -158,7 +158,7 @@ class Database extends Service {
158
158
///
159
159
///
160
160
Future <models.AttributeEmail > createEmailAttribute ({required String collectionId, required String key, required bool xrequired, String ? xdefault, bool ? array}) async {
161
- final String path = '/database/collections/{collectionId}/attributes/email' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
161
+ final String path = '/database/collections/{collectionId}/attributes/email' .replaceAll ('{collectionId}' , collectionId);
162
162
163
163
final Map <String , dynamic > params = {
164
164
'key' : key,
@@ -177,7 +177,7 @@ class Database extends Service {
177
177
178
178
/// Create Enum Attribute
179
179
Future <models.AttributeEnum > createEnumAttribute ({required String collectionId, required String key, required List elements, required bool xrequired, String ? xdefault, bool ? array}) async {
180
- final String path = '/database/collections/{collectionId}/attributes/enum' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
180
+ final String path = '/database/collections/{collectionId}/attributes/enum' .replaceAll ('{collectionId}' , collectionId);
181
181
182
182
final Map <String , dynamic > params = {
183
183
'key' : key,
@@ -202,7 +202,7 @@ class Database extends Service {
202
202
///
203
203
///
204
204
Future <models.AttributeFloat > createFloatAttribute ({required String collectionId, required String key, required bool xrequired, String ? min, String ? max, String ? xdefault, bool ? array}) async {
205
- final String path = '/database/collections/{collectionId}/attributes/float' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
205
+ final String path = '/database/collections/{collectionId}/attributes/float' .replaceAll ('{collectionId}' , collectionId);
206
206
207
207
final Map <String , dynamic > params = {
208
208
'key' : key,
@@ -228,7 +228,7 @@ class Database extends Service {
228
228
///
229
229
///
230
230
Future <models.AttributeInteger > createIntegerAttribute ({required String collectionId, required String key, required bool xrequired, int ? min, int ? max, int ? xdefault, bool ? array}) async {
231
- final String path = '/database/collections/{collectionId}/attributes/integer' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
231
+ final String path = '/database/collections/{collectionId}/attributes/integer' .replaceAll ('{collectionId}' , collectionId);
232
232
233
233
final Map <String , dynamic > params = {
234
234
'key' : key,
@@ -253,7 +253,7 @@ class Database extends Service {
253
253
///
254
254
///
255
255
Future <models.AttributeIp > createIpAttribute ({required String collectionId, required String key, required bool xrequired, String ? xdefault, bool ? array}) async {
256
- final String path = '/database/collections/{collectionId}/attributes/ip' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
256
+ final String path = '/database/collections/{collectionId}/attributes/ip' .replaceAll ('{collectionId}' , collectionId);
257
257
258
258
final Map <String , dynamic > params = {
259
259
'key' : key,
@@ -276,7 +276,7 @@ class Database extends Service {
276
276
///
277
277
///
278
278
Future <models.AttributeString > createStringAttribute ({required String collectionId, required String key, required int size, required bool xrequired, String ? xdefault, bool ? array}) async {
279
- final String path = '/database/collections/{collectionId}/attributes/string' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
279
+ final String path = '/database/collections/{collectionId}/attributes/string' .replaceAll ('{collectionId}' , collectionId);
280
280
281
281
final Map <String , dynamic > params = {
282
282
'key' : key,
@@ -300,7 +300,7 @@ class Database extends Service {
300
300
///
301
301
///
302
302
Future <models.AttributeUrl > createUrlAttribute ({required String collectionId, required String key, required bool xrequired, String ? xdefault, bool ? array}) async {
303
- final String path = '/database/collections/{collectionId}/attributes/url' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
303
+ final String path = '/database/collections/{collectionId}/attributes/url' .replaceAll ('{collectionId}' , collectionId);
304
304
305
305
final Map <String , dynamic > params = {
306
306
'key' : key,
@@ -319,7 +319,7 @@ class Database extends Service {
319
319
320
320
/// Get Attribute
321
321
Future getAttribute ({required String collectionId, required String key}) async {
322
- final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
322
+ final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
323
323
324
324
final Map <String , dynamic > params = {
325
325
};
@@ -334,7 +334,7 @@ class Database extends Service {
334
334
335
335
/// Delete Attribute
336
336
Future deleteAttribute ({required String collectionId, required String key}) async {
337
- final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
337
+ final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
338
338
339
339
final Map <String , dynamic > params = {
340
340
};
@@ -355,7 +355,7 @@ class Database extends Service {
355
355
/// modes](/docs/admin).
356
356
///
357
357
Future <models.DocumentList > listDocuments ({required String collectionId, List ? queries, int ? limit, int ? offset, String ? cursor, String ? cursorDirection, List ? orderAttributes, List ? orderTypes}) async {
358
- final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
358
+ final String path = '/database/collections/{collectionId}/documents' .replaceAll ('{collectionId}' , collectionId);
359
359
360
360
final Map <String , dynamic > params = {
361
361
'queries' : queries,
@@ -383,7 +383,7 @@ class Database extends Service {
383
383
/// directly from your database console.
384
384
///
385
385
Future <models.Document > createDocument ({required String collectionId, required String documentId, required Map data, List ? read, List ? write}) async {
386
- final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
386
+ final String path = '/database/collections/{collectionId}/documents' .replaceAll ('{collectionId}' , collectionId);
387
387
388
388
final Map <String , dynamic > params = {
389
389
'documentId' : documentId,
@@ -406,7 +406,7 @@ class Database extends Service {
406
406
/// object with the document data.
407
407
///
408
408
Future <models.Document > getDocument ({required String collectionId, required String documentId}) async {
409
- final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
409
+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
410
410
411
411
final Map <String , dynamic > params = {
412
412
};
@@ -425,7 +425,7 @@ class Database extends Service {
425
425
/// only specific fields that will get updated.
426
426
///
427
427
Future <models.Document > updateDocument ({required String collectionId, required String documentId, required Map data, List ? read, List ? write}) async {
428
- final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
428
+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
429
429
430
430
final Map <String , dynamic > params = {
431
431
'data' : data,
@@ -448,7 +448,7 @@ class Database extends Service {
448
448
/// **will not** be deleted.
449
449
///
450
450
Future deleteDocument ({required String collectionId, required String documentId}) async {
451
- final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
451
+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
452
452
453
453
final Map <String , dynamic > params = {
454
454
};
@@ -463,7 +463,7 @@ class Database extends Service {
463
463
464
464
/// List Indexes
465
465
Future <models.IndexList > listIndexes ({required String collectionId}) async {
466
- final String path = '/database/collections/{collectionId}/indexes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
466
+ final String path = '/database/collections/{collectionId}/indexes' .replaceAll ('{collectionId}' , collectionId);
467
467
468
468
final Map <String , dynamic > params = {
469
469
};
@@ -478,7 +478,7 @@ class Database extends Service {
478
478
479
479
/// Create Index
480
480
Future <models.Index > createIndex ({required String collectionId, required String key, required String type, required List attributes, List ? orders}) async {
481
- final String path = '/database/collections/{collectionId}/indexes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
481
+ final String path = '/database/collections/{collectionId}/indexes' .replaceAll ('{collectionId}' , collectionId);
482
482
483
483
final Map <String , dynamic > params = {
484
484
'key' : key,
@@ -497,7 +497,7 @@ class Database extends Service {
497
497
498
498
/// Get Index
499
499
Future <models.Index > getIndex ({required String collectionId, required String key}) async {
500
- final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
500
+ final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
501
501
502
502
final Map <String , dynamic > params = {
503
503
};
@@ -512,7 +512,7 @@ class Database extends Service {
512
512
513
513
/// Delete Index
514
514
Future deleteIndex ({required String collectionId, required String key}) async {
515
- final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
515
+ final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
516
516
517
517
final Map <String , dynamic > params = {
518
518
};
0 commit comments