@@ -11,11 +11,7 @@ class Database extends Service {
1111 /// of the project's collections. [Learn more about different API
1212 /// modes](/docs/admin).
1313 ///
14- Future <Response > listCollections ({String ? search
15- , int ? limit
16- , int ? offset
17- , String ? orderType
18- }) {
14+ Future <Response > listCollections ({String ? search, int ? limit, int ? offset, String ? orderType}) {
1915 final String path = '/database/collections' ;
2016
2117 final Map <String , dynamic > params = {
@@ -36,11 +32,7 @@ class Database extends Service {
3632 ///
3733 /// Create a new Collection.
3834 ///
39- Future <Response > createCollection ({required String name
40- , required List read
41- , required List write
42- , required List rules
43- }) {
35+ Future <Response > createCollection ({required String name, required List read, required List write, required List rules}) {
4436 final String path = '/database/collections' ;
4537
4638 final Map <String , dynamic > params = {
@@ -62,8 +54,7 @@ class Database extends Service {
6254 /// Get a collection by its unique ID. This endpoint response returns a JSON
6355 /// object with the collection metadata.
6456 ///
65- Future <Response > getCollection ({required String collectionId
66- }) {
57+ Future <Response > getCollection ({required String collectionId}) {
6758 final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ('{collectionId}' ), collectionId);
6859
6960 final Map <String , dynamic > params = {
@@ -80,12 +71,7 @@ class Database extends Service {
8071 ///
8172 /// Update a collection by its unique ID.
8273 ///
83- Future <Response > updateCollection ({required String collectionId
84- , required String name
85- , List ? read
86- , List ? write
87- , List ? rules
88- }) {
74+ Future <Response > updateCollection ({required String collectionId, required String name, List ? read, List ? write, List ? rules}) {
8975 final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ('{collectionId}' ), collectionId);
9076
9177 final Map <String , dynamic > params = {
@@ -107,8 +93,7 @@ class Database extends Service {
10793 /// Delete a collection by its unique ID. Only users with write permissions
10894 /// have access to delete this resource.
10995 ///
110- Future <Response > deleteCollection ({required String collectionId
111- }) {
96+ Future <Response > deleteCollection ({required String collectionId}) {
11297 final String path = '/database/collections/{collectionId}' .replaceAll (RegExp ('{collectionId}' ), collectionId);
11398
11499 final Map <String , dynamic > params = {
@@ -128,15 +113,7 @@ class Database extends Service {
128113 /// of the project's documents. [Learn more about different API
129114 /// modes](/docs/admin).
130115 ///
131- Future <Response > listDocuments ({required String collectionId
132- , List ? filters
133- , int ? limit
134- , int ? offset
135- , String ? orderField
136- , String ? orderType
137- , String ? orderCast
138- , String ? search
139- }) {
116+ Future <Response > listDocuments ({required String collectionId, List ? filters, int ? limit, int ? offset, String ? orderField, String ? orderType, String ? orderCast, String ? search}) {
140117 final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ('{collectionId}' ), collectionId);
141118
142119 final Map <String , dynamic > params = {
@@ -163,14 +140,7 @@ class Database extends Service {
163140 /// integration](/docs/server/database#databaseCreateCollection) API or
164141 /// directly from your database console.
165142 ///
166- Future <Response > createDocument ({required String collectionId
167- , required Map data
168- , List ? read
169- , List ? write
170- , String ? parentDocument
171- , String ? parentProperty
172- , String ? parentPropertyType
173- }) {
143+ Future <Response > createDocument ({required String collectionId, required Map data, List ? read, List ? write, String ? parentDocument, String ? parentProperty, String ? parentPropertyType}) {
174144 final String path = '/database/collections/{collectionId}/documents' .replaceAll (RegExp ('{collectionId}' ), collectionId);
175145
176146 final Map <String , dynamic > params = {
@@ -194,9 +164,7 @@ class Database extends Service {
194164 /// Get a document by its unique ID. This endpoint response returns a JSON
195165 /// object with the document data.
196166 ///
197- Future <Response > getDocument ({required String collectionId
198- , required String documentId
199- }) {
167+ Future <Response > getDocument ({required String collectionId, required String documentId}) {
200168 final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ('{collectionId}' ), collectionId).replaceAll (RegExp ('{documentId}' ), documentId);
201169
202170 final Map <String , dynamic > params = {
@@ -214,12 +182,7 @@ class Database extends Service {
214182 /// Update a document by its unique ID. Using the patch method you can pass
215183 /// only specific fields that will get updated.
216184 ///
217- Future <Response > updateDocument ({required String collectionId
218- , required String documentId
219- , required Map data
220- , List ? read
221- , List ? write
222- }) {
185+ Future <Response > updateDocument ({required String collectionId, required String documentId, required Map data, List ? read, List ? write}) {
223186 final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ('{collectionId}' ), collectionId).replaceAll (RegExp ('{documentId}' ), documentId);
224187
225188 final Map <String , dynamic > params = {
@@ -241,9 +204,7 @@ class Database extends Service {
241204 /// documents, its attributes and relations to other documents. Child documents
242205 /// **will not** be deleted.
243206 ///
244- Future <Response > deleteDocument ({required String collectionId
245- , required String documentId
246- }) {
207+ Future <Response > deleteDocument ({required String collectionId, required String documentId}) {
247208 final String path = '/database/collections/{collectionId}/documents/{documentId}' .replaceAll (RegExp ('{collectionId}' ), collectionId).replaceAll (RegExp ('{documentId}' ), documentId);
248209
249210 final Map <String , dynamic > params = {
0 commit comments