@@ -59,7 +59,7 @@ class Database extends Service {
5959 /// object with the collection metadata.
6060 ///
6161 Future <models.Collection > getCollection ({required String collectionId}) async {
62- final String path = '/database/collections/{collectionId}' .replaceAll ('{collectionId}' , collectionId);
62+ final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
6363
6464 final Map <String , dynamic > params = {
6565 };
@@ -77,7 +77,7 @@ class Database extends Service {
7777 /// Update a collection by its unique ID.
7878 ///
7979 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 ('{collectionId}' , collectionId);
80+ final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
8181
8282 final Map <String , dynamic > params = {
8383 'name' : name,
@@ -101,7 +101,7 @@ class Database extends Service {
101101 /// have access to delete this resource.
102102 ///
103103 Future deleteCollection ({required String collectionId}) async {
104- final String path = '/database/collections/{collectionId}' .replaceAll ('{collectionId}' , collectionId);
104+ final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
105105
106106 final Map <String , dynamic > params = {
107107 };
@@ -116,7 +116,7 @@ class Database extends Service {
116116
117117 /// List Attributes
118118 Future <models.AttributeList > listAttributes ({required String collectionId}) async {
119- final String path = '/database/collections/{collectionId}/attributes' .replaceAll ('{collectionId}' , collectionId);
119+ final String path = '/database/collections/{collectionId}/attributes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
120120
121121 final Map <String , dynamic > params = {
122122 };
@@ -135,7 +135,7 @@ class Database extends Service {
135135 ///
136136 ///
137137 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 ('{collectionId}' , collectionId);
138+ final String path = '/database/collections/{collectionId}/attributes/boolean' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
139139
140140 final Map <String , dynamic > params = {
141141 'key' : key,
@@ -158,7 +158,7 @@ class Database extends Service {
158158 ///
159159 ///
160160 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 ('{collectionId}' , collectionId);
161+ final String path = '/database/collections/{collectionId}/attributes/email' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
162162
163163 final Map <String , dynamic > params = {
164164 'key' : key,
@@ -177,7 +177,7 @@ class Database extends Service {
177177
178178 /// Create Enum Attribute
179179 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 ('{collectionId}' , collectionId);
180+ final String path = '/database/collections/{collectionId}/attributes/enum' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
181181
182182 final Map <String , dynamic > params = {
183183 'key' : key,
@@ -202,7 +202,7 @@ class Database extends Service {
202202 ///
203203 ///
204204 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 ('{collectionId}' , collectionId);
205+ final String path = '/database/collections/{collectionId}/attributes/float' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
206206
207207 final Map <String , dynamic > params = {
208208 'key' : key,
@@ -228,7 +228,7 @@ class Database extends Service {
228228 ///
229229 ///
230230 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 ('{collectionId}' , collectionId);
231+ final String path = '/database/collections/{collectionId}/attributes/integer' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
232232
233233 final Map <String , dynamic > params = {
234234 'key' : key,
@@ -253,7 +253,7 @@ class Database extends Service {
253253 ///
254254 ///
255255 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 ('{collectionId}' , collectionId);
256+ final String path = '/database/collections/{collectionId}/attributes/ip' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
257257
258258 final Map <String , dynamic > params = {
259259 'key' : key,
@@ -276,7 +276,7 @@ class Database extends Service {
276276 ///
277277 ///
278278 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 ('{collectionId}' , collectionId);
279+ final String path = '/database/collections/{collectionId}/attributes/string' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
280280
281281 final Map <String , dynamic > params = {
282282 'key' : key,
@@ -300,7 +300,7 @@ class Database extends Service {
300300 ///
301301 ///
302302 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 ('{collectionId}' , collectionId);
303+ final String path = '/database/collections/{collectionId}/attributes/url' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
304304
305305 final Map <String , dynamic > params = {
306306 'key' : key,
@@ -319,7 +319,7 @@ class Database extends Service {
319319
320320 /// Get Attribute
321321 Future getAttribute ({required String collectionId, required String key}) async {
322- final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
322+ final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
323323
324324 final Map <String , dynamic > params = {
325325 };
@@ -334,7 +334,7 @@ class Database extends Service {
334334
335335 /// Delete Attribute
336336 Future deleteAttribute ({required String collectionId, required String key}) async {
337- final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
337+ final String path = '/database/collections/{collectionId}/attributes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
338338
339339 final Map <String , dynamic > params = {
340340 };
@@ -355,7 +355,7 @@ class Database extends Service {
355355 /// modes](/docs/admin).
356356 ///
357357 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 ('{collectionId}' , collectionId);
358+ final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
359359
360360 final Map <String , dynamic > params = {
361361 'queries' : queries,
@@ -383,7 +383,7 @@ class Database extends Service {
383383 /// directly from your database console.
384384 ///
385385 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 ('{collectionId}' , collectionId);
386+ final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
387387
388388 final Map <String , dynamic > params = {
389389 'documentId' : documentId,
@@ -406,7 +406,7 @@ class Database extends Service {
406406 /// object with the document data.
407407 ///
408408 Future <models.Document > getDocument ({required String collectionId, required String documentId}) async {
409- final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
409+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
410410
411411 final Map <String , dynamic > params = {
412412 };
@@ -425,7 +425,7 @@ class Database extends Service {
425425 /// only specific fields that will get updated.
426426 ///
427427 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 ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
428+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
429429
430430 final Map <String , dynamic > params = {
431431 'data' : data,
@@ -448,7 +448,7 @@ class Database extends Service {
448448 /// **will not** be deleted.
449449 ///
450450 Future deleteDocument ({required String collectionId, required String documentId}) async {
451- final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{documentId}' , documentId);
451+ final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{documentId}' ) , documentId);
452452
453453 final Map <String , dynamic > params = {
454454 };
@@ -463,7 +463,7 @@ class Database extends Service {
463463
464464 /// List Indexes
465465 Future <models.IndexList > listIndexes ({required String collectionId}) async {
466- final String path = '/database/collections/{collectionId}/indexes' .replaceAll ('{collectionId}' , collectionId);
466+ final String path = '/database/collections/{collectionId}/indexes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
467467
468468 final Map <String , dynamic > params = {
469469 };
@@ -478,7 +478,7 @@ class Database extends Service {
478478
479479 /// Create Index
480480 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 ('{collectionId}' , collectionId);
481+ final String path = '/database/collections/{collectionId}/indexes' .replaceAll (RegExp ( '{collectionId}' ) , collectionId);
482482
483483 final Map <String , dynamic > params = {
484484 'key' : key,
@@ -497,7 +497,7 @@ class Database extends Service {
497497
498498 /// Get Index
499499 Future <models.Index > getIndex ({required String collectionId, required String key}) async {
500- final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
500+ final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
501501
502502 final Map <String , dynamic > params = {
503503 };
@@ -512,7 +512,7 @@ class Database extends Service {
512512
513513 /// Delete Index
514514 Future deleteIndex ({required String collectionId, required String key}) async {
515- final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll ('{collectionId}' , collectionId).replaceAll ('{key}' , key);
515+ final String path = '/database/collections/{collectionId}/indexes/{key}' .replaceAll (RegExp ( '{collectionId}' ) , collectionId).replaceAll (RegExp ( '{key}' ) , key);
516516
517517 final Map <String , dynamic > params = {
518518 };
0 commit comments